Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Forms and the method post

Posted on 2003-11-27
2
Medium Priority
?
634 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 320 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

824 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