PDA

View Full Version : doesn't want to execute.


mklijnstra
08-10-2002, 05:56 PM
I made a simple script to send and recieve test, but for some reason the second page doesn't load any $ variables.
here is a piece of script of the second page:

<b>Posted on:</b><?php print($date); ?>.
<b>By:</b><?php print($name); ?>.

<?php print($news); ?>.

And this is the first page sending to the script at the second page:

<form action="dnp.php" methode="post">
<b>Date:</b>
<input type="text" name="date"
value="<?php print($date); ?>" size="15"> <br />

<b>Your name:</b>
<input type="text" name="name"
value="<?php print($name); ?>" size="35"> <br />

<b>News:</b>
<input type="text" name="news"
value="<?php print($news); ?>" size="150"> <br />


<input type="submit" Value="go!" Size="15" />

Can you help me?

Ökii
08-11-2002, 06:41 AM
If you have a newish version of PHP you might well have register globals set to off, thus indicting a need to access the post vars array with slightly different syntax

either:

<?php echo $_POST['name']; ?>
or
<?php echo $HTTP_POST_VARS['name']; ?>

also - in your form coding, methode is generally spelled without the trailing e.

mklijnstra
08-11-2002, 10:48 PM
Well i am kinda of a newbe to php, but how can i change this forum so that it posts and makes an html script and adds new visible text every time you execute the form?