Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-10-2002, 05:56 PM   PM User | #1
mklijnstra
New to the CF scene

 
Join Date: Aug 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
mklijnstra is an unknown quantity at this point
doesn't want to execute.

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?
mklijnstra is offline   Reply With Quote
Old 08-11-2002, 06:41 AM   PM User | #2
Ökii
Regular Coder

 
Join Date: Jun 2002
Location: UK
Posts: 577
Thanks: 0
Thanked 0 Times in 0 Posts
Ökii is an unknown quantity at this point
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.
__________________
Ökii - formerly pootergeist
teckis - take your time and it'll save you time.
Ökii is offline   Reply With Quote
Old 08-11-2002, 10:48 PM   PM User | #3
mklijnstra
New to the CF scene

 
Join Date: Aug 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
mklijnstra is an unknown quantity at this point
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?
mklijnstra is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:45 AM.


Advertisement
Log in to turn off these ads.