Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    UK
    Posts
    577
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •