Jump to content

passing post in html


gjwolf1

Recommended Posts

I have an hml page that uses option values and lets the user select values.  the values are php pages which when they submit pass the chosen value to the next page I show a snip below.  I wanted to have the form action grab the formVar passed to it- but I can't seem to get it going.  I figure I just may not be putting the post in correctly- any help appreciated

 

 

<head><title>page2</title></head>

<body>

<form action=="<?php  $_POST['formVar']; ?>" method="POST">

 

Link to comment
https://forums.phpfreaks.com/topic/228912-passing-post-in-html/
Share on other sites

thank you for replying, I tried still it doesn't work- is it missing a } ?

 

I tried this way

<form action="<?php echo{$_POST['formVar']}; ?>" method="POST">

 

and this way w/ no luck

 

<form action="<?php echo($_POST['formVar']); ?>" method="POST">

 

 

any help appreciated

Hi Harris- you were right as I did screw up the variable input, it is correct now but the code below still only comes up literal and will not let the post value be set in there

 

 

 

<html>

 

<head><title>Config input form</title></head>

<body>

 

<form action="<?php echo $_POST['item']; ?>" method="POST">

<b>Location name ie. Beaumont</b><br>

 

 

 

 

this has the same result

 

willl still not let the variable from post be set within those quotes, it will come up literal as it is in the browser string

 

have you seen an example or something maybe that I can see work, I cannot get it working

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.