Solved

Forms and the method post

Posted on 2003-11-27
2
629 Views
Last Modified: 2008-03-06
Hi!

I have two php pages on php for windows, and I want to post a variable from the page choose.php to choose2.php

I have the form in choose.php:

<form name="choosedate"  action="choose2.php" method="post">
      <select name="fday">
      <option value="01">01  
      <option value="02">02      

</select>
<input type="submit" name="Submit" value="Submit">
</form>

and in choose2.php
i try to write:

<?php

echo "$fday";
?>

But i get the error:
Notice: Undefined variable: fday in E:\Inetpub\wwwroot\tev2\choose2.php on line 3


Can anyone tell me what to do or explain why this happens?

Thanks in advance!

Best regards,
Tom-Erik


     
0
Comment
Question by:tomerikv
2 Comments
 
LVL 24

Accepted Solution

by:
shivsa earned 80 total points
ID: 9834539
<?php

$fday = $_POST['fday'];
echo "$fday";
?>
0
 
LVL 1

Author Comment

by:tomerikv
ID: 9836809
Thank's that worked!

Best regards,
Tom-Erik
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question