Solved

Forms and the method post

Posted on 2003-11-27
2
626 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
Comment Utility
<?php

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

Author Comment

by:tomerikv
Comment Utility
Thank's that worked!

Best regards,
Tom-Erik
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now