Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Have problem with Form Action=Webpage.php?Whatever=1

Posted on 2007-10-18
4
Medium Priority
?
250 Views
Last Modified: 2009-07-29
I have a search box and a Submit button; I can not seem to figure out how to get the data entered from the textbox to the &Criteria=(Field).

<form action="Employee_ViewRMA_Results.php?Search=1&Criteria=<?php $_POST['RMA_Number'] ; ?>" method="post">
                  RMA Number:  <input type="text" id="RMA_Number" name="RMA_Number"><br>
                  <input name="Search" id="submit" value="Search" type="submit">
</form>
0
Comment
Question by:thaburner
  • 2
4 Comments
 
LVL 20

Expert Comment

by:steelseth12
ID: 20102130
you must echo the value

<form action="Employee_ViewRMA_Results.php?Search=1&Criteria=<?php echo $_POST['RMA_Number'] ; ?>" method="post">
                  RMA Number:  <input type="text" id="RMA_Number" name="RMA_Number"><br>
                  <input name="Search" id="submit" value="Search" type="submit">
</form>
0
 
LVL 20

Accepted Solution

by:
steelseth12 earned 2000 total points
ID: 20102144
I always prefer to put my values into hidden fields and not in the action

<form action="Employee_ViewRMA_Results.php" method="post">
                 
                  <input type="hidden" name="Search" value="1" />
                 
                  <input type="hidden" name="Criteria" value="<?php echo $_POST['RMA_Number'] ; ?>" />
                 
                  RMA Number:  <input type="text" id="RMA_Number" name="RMA_Number"><br>
                  <input name="Search" id="submit" value="Search" type="submit">
</form>
0
 

Author Comment

by:thaburner
ID: 20102277
That did the trick and I like the second better you posted better.

Thanks,
0
 
LVL 17

Expert Comment

by:nplib
ID: 20102288
on the Employee_ViewRMA_Results.php?

$rma_number = $_POST['RMA_Number'];
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
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.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month20 days, 15 hours left to enroll

864 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