it went wrong, and since i use linux and rest of the school (guess what) windows teacher told that he could’t help me.
I use Quanta 3.5 for this calss.
After i typed the code i tryed to view it. I could see entry boxes and the button “Sla op”, but entry boxes are feeled by:
<?php echo $_POST'voornaam']; ?>
it seems like php script is not red.
apache is running.
please tell me what i got to do to make php work.
thnx
Do you have PHP for Apache installed on the box as well? Post the
output to the following command:
rpm -qa | grep -i php
Also, while we can try to be fast with replying, search back through
this forum for related issues. This has come up quite a few times and
some of the experts have responded with every step known to man that
will probably get you where you want to be. Basically be sure you have
the modules installed (see above command to verify) have Apache
configured, restart Apache, run.
And your teacher is a pansy.
Good luck.
nikotron wrote:
> hie everyone,
>
> at school we are learning php. and this is the code that i had to
> execute in class:
>
> Code:
> --------------------
>
> <HTML>
> <HEAD><TITLE>Een voorbeeld</TITLE></HEAD>
> <BODY>
> <FORM method=“post” action="<?php echo $_SERVER’SCRIPT_NAME’]; ?>">
> Voornaam:<input type=“text” name=“voornaam” value="<?php echo $_POST’voornaam’]; ?>" /></br>
> Achternaam: <input type=“text” name=“achternaam” value="<?php echo $_POST’achternaam’]; ?>" /></br>
> <input type=“submit” value=“Sla op” />
> </FORM>
>
>
> <?php
> if ($_SERVER’REQUEST_METHOD’] == ‘POST’)
> {
> if ($_POST’voornaam’] && $_POST’achternaam’])
> {
> echo ‘Sla op in database’;
> }
> else
> {
> echo ‘u moet’;
> }
> }
> ?>
>
> </BODY>
> </HTML>
>
> --------------------
>
>
> it went wrong, and since i use linux and rest of the school (guess
> what) windows teacher told that he could’t help me.
> I use Quanta 3.5 for this calss.
> After i typed the code i tryed to view it. I could see entry boxes and
> the button -“Sla op”-, but entry boxes are feeled by:
>
> Code:
> --------------------
>
> <?php echo $_POST’voornaam’]; ?>
>
> --------------------
>
> it seems like php script is not red.
> apache is running.
> please tell me what i got to do to make php work.
> thnx
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
Also if you have PHP command-line version (CLI) installed you can force
the file through that manually to see that the output is what you expect
even without a web server. This may not work for your teacher depending
on if (s)he really wants you to have your own working web server for
demonstrations (which wouldn’t make sense to me for grading, but
whatever) but it will let you do testing without a web browser or server.
php5 /path/to/PHP/file.php
Good luck.
ab@novell.com wrote:
> Do you have PHP for Apache installed on the box as well? Post the
> output to the following command:
>
> rpm -qa | grep -i php
>
> Also, while we can try to be fast with replying, search back through
> this forum for related issues. This has come up quite a few times and
> some of the experts have responded with every step known to man that
> will probably get you where you want to be. Basically be sure you have
> the modules installed (see above command to verify) have Apache
> configured, restart Apache, run.
>
> And your teacher is a pansy.
>
> Good luck.
>
>
>
>
>
> nikotron wrote:
>> hie everyone,
>
>> at school we are learning php. and this is the code that i had to
>> execute in class:
>
>> Code:
>> --------------------
>
>> <HTML>
>> <HEAD><TITLE>Een voorbeeld</TITLE></HEAD>
>> <BODY>
>> <FORM method=“post” action="<?php echo $_SERVER’SCRIPT_NAME’]; ?>">
>> Voornaam:<input type=“text” name=“voornaam” value="<?php echo $_POST’voornaam’]; ?>" /></br>
>> Achternaam: <input type=“text” name=“achternaam” value="<?php echo $_POST’achternaam’]; ?>" /></br>
>> <input type=“submit” value=“Sla op” />
>> </FORM>
>
>
>> <?php
>> if ($_SERVER’REQUEST_METHOD’] == ‘POST’)
>> {
>> if ($_POST’voornaam’] && $_POST’achternaam’])
>> {
>> echo ‘Sla op in database’;
>> }
>> else
>> {
>> echo ‘u moet’;
>> }
>> }
>> ?>
>
>> </BODY>
>> </HTML>
>
>> --------------------
>
>
>> it went wrong, and since i use linux and rest of the school (guess
>> what) windows teacher told that he could’t help me.
>> I use Quanta 3.5 for this calss.
>> After i typed the code i tryed to view it. I could see entry boxes and
>> the button -“Sla op”-, but entry boxes are feeled by:
>
>> Code:
>> --------------------
>
>> <?php echo $_POST’voornaam’]; ?>
>
>> --------------------
>
>> it seems like php script is not red.
>> apache is running.
>> please tell me what i got to do to make php work.
>> thnx
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
note the 3 equals signs. Currently it will probably trigger all the
time as you are just checking the variable’s type, not content
nikotron wrote:
> hie everyone,
>
> at school we are learning php. and this is the code that i had to
> execute in class:
>
> Code:
> --------------------
>
> <HTML>
> <HEAD><TITLE>Een voorbeeld</TITLE></HEAD>
> <BODY>
> <FORM method=“post” action="<?php echo $_SERVER’SCRIPT_NAME’]; ?>">
> Voornaam:<input type=“text” name=“voornaam” value="<?php echo $_POST’voornaam’]; ?>" /></br>
> Achternaam: <input type=“text” name=“achternaam” value="<?php echo $_POST’achternaam’]; ?>" /></br>
> <input type=“submit” value=“Sla op” />
> </FORM>
>
>
> <?php
> if ($_SERVER’REQUEST_METHOD’] == ‘POST’)
> {
> if ($_POST’voornaam’] && $_POST’achternaam’])
> {
> echo ‘Sla op in database’;
> }
> else
> {
> echo ‘u moet’;
> }
> }
> ?>
>
> </BODY>
> </HTML>
>
> --------------------
>
>
> it went wrong, and since i use linux and rest of the school (guess
> what) windows teacher told that he could’t help me.
> I use Quanta 3.5 for this calss.
> After i typed the code i tryed to view it. I could see entry boxes and
> the button -“Sla op”-, but entry boxes are feeled by:
>
> Code:
> --------------------
>
> <?php echo $_POST’voornaam’]; ?>
>
> --------------------
>
> it seems like php script is not red.
> apache is running.
> please tell me what i got to do to make php work.
> thnx
>
>
when opened in konqueror (or any other browser) doesn’t give me anything. But if i place this file into /srv/www/htdocs and then type in address bar localhost/phpinfo.php the i get very nice php configuration site.
I thought that if i would do the same with file from my class it would work…but it doesn’t.
Okay, looks like you are well on your way. Is your file name for your
test file ending in .php? If you end in .htm or .html then you are
getting the right thing, so be sure your file is ending in .php .
Good luck.
nikotron wrote:
> thnx for ur reply.
> this is what i got:
>
>
> Code:
> --------------------
>
>
> nikoshiba:/home/nikom # rpm -qa | grep -i php
> php5-json-5.2.6-0.4
> php5-dom-5.2.6-0.4
> php5-xmlreader-5.2.6-0.4
> php5-tokenizer-5.2.6-0.4
> php5-pdo-5.2.6-0.4
> php5-mysql-5.2.6-0.4
> php5-5.2.6-0.4
> php5-iconv-5.2.6-0.4
> apache2-mod_php5-5.2.6-0.4
> php5-sqlite-5.2.6-0.4
> php5-hash-5.2.6-0.4
> php5-xmlwriter-5.2.6-0.4
> php5-ctype-5.2.6-0.4
>
> --------------------
>
> and
>
> Code:
> --------------------
> nikoshiba:/home/nikom # a2enmod php5
> “php5” already present
>
> --------------------
>
>
> this simple php file:
>
> Code:
> --------------------
>
> <?php
> phpinfo();
> ?>
>
> --------------------
>
> when opened in konqueror (or any other browser) doesn’t give me
> anything. But if i place this file into /srv/www/htdocs and then type in
> address bar localhost/phpinfo.php the i get very nice php configuration
> site.
> I thought that if i would do the same with file from my class it would
> work…but it doesn’t.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org