?
Solved

PHP JavaScript question

Posted on 2006-05-08
4
Medium Priority
?
247 Views
Last Modified: 2006-11-18
I have a sample php page which generates html like this:

<html>
<form name=abc method=post action="xyz.php">
<input type=text name='LName' value='lastname'>
<input type=text name='FName' value='firstname'>
<input type=text name='CDate' value='05/05/2006'>
</form>

<form name=def method=post action="pqr.php">
<br><br>
<!-- some html embedded here-->
</form>

<form name=rst method=post action="yyy.php">
<input type=submit name='Update Stuff'>
<input type=reset name='Clear stuff'>
</form>

</html>

I want to access the form variables "LName", "FName", "CDate" from "yyy.php" page when I click on the "Update" button. "LName", "FName" and "CDate" values can be changed before hitting the submit button.

How can I do this?

Remember the form seperation in the above html. There is no way I can change the form seperation as it includes complex UI changes which are not required.

Thanks
0
Comment
Question by:niftyhawk
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
funamentalist earned 1000 total points
ID: 16632231
hmm

in php u would access them like
$_POST[LName] , $_POST[FName] etc
0
 
LVL 5

Expert Comment

by:funamentalist
ID: 16632245
and use this

<form name=rst method=post action="yyy.php">
<input type=button name='Update Stuff' onclick='document.abc.submit()'>
<input type=reset name='Clear stuff'>
</form>
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

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.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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 …
Suggested Courses
Course of the Month16 days, 5 hours left to enroll

850 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