kvarnerexpress
Apr 25 2005, 09:18 PM
| | I have a form, from where the data is being posted to a php script. Now in the php script the script has to forward the data to another script with posted data. I know this can be done using header but i don't know how to keep the data posted with form in POST method.
For example:
The form below:
Code: <form method="POST" action="1.php"> <input type="hidden" value="abc" name="t1"> <input type="submit"> </form>
Now its posting data using POST method to 1.php...and now 1.php will redirect everything to another php script with the data and it should be in POST method ...
How can i do this ?
Thanks.
|
Reply
snlildude87
Apr 25 2005, 09:29 PM
Hmm, you can have a hidden form with hidden inputs in 1.php... 1.php: CODE <?php echo "<form method=\"POST\" action=\"[url of script to send info]\">\n\t"; echo "<input type=\"hidden\" name=\"[name of your choice]\" value=\"[value of the data from previous script]\">\n"; echo "<form>\n"; ?> I hope this made sense, but this is essentially what you did in your example... I'm still a newbie to PHP, so I'm trying the best I can to help you.
Reply
beeseven
Apr 25 2005, 09:45 PM
I'm not sure I completely understand, but I think you could do this: 1. Get the data from the form ($a = $_POST['a']; $b = $_POST['b'];) 2. Redirect with the data in the url (header("Location: http://aaa.aaaaa.aaa/ab.php?a=a&b=b"); die;) 3. Use $_GET to get the data ($a = $_GET['a']; $b =$_GET['b'];)
Reply
FaLgoR
Apr 26 2005, 05:07 PM
You can do it by two ways: 1°, using hidden inputs. 2°, add the values on the url, look: CODE <? header("Location: page.php?t1=$t1&t2=$t2&t3=$t3"); ?>
Got it? =D
Reply
Newton
Apr 29 2005, 11:30 AM
If you need the data a few page access' later then just dump it in a cookie as a concatenated string.
Reply
Similar Topics
Keywords : redirct, post, data
- Php + Mysql Question!
While inserting data into MySQL, how can I know if the data I'm in (4)
Php Email Validation
A PHP data validation class with many functions (1) I've been reading through my old php book (PHP 4.1) and came across this data validation class.
It can check a number of things ranging from telephone numbers , credit card number formats, email
address and some others. I checked out some of the methods although I didnt expect it to work 100%
because I've found source code errors thoughout the book and CD. I tested out a few of the
methods to check and some of them did return expected results but some didnt either so the data
validation class was not perfect and it didnt really bother me. The cool thing I found....
Using Multiple Selection Array In Table To Order Data
Using multiple selection array in table to order data (1) have a form that has a multiple select choice, like this: CODE <form method="post"
action="display.php" <select multiple name="selectsort[]">
<option value="code">Code</option> <option
value="amount">Amount</option> <option value="dateammended">Date
Ammended</option> <option value="expreviewdate">Expiration/Review
Date</option> <option value="effectivedate">Effective Date</option>
<option value="e....
What Does This Do?
$ban = ($data->login) ? $lban : $iban; (4) I'm correcting a 'few' php-files for a friend, but I got this line of code: CODE
$ban = ($data->login) ? $lban : $iban; and I don't know
what it does xD Could someone please explain me what this line does? Thanks....
Problems With Data Formatting
(2) I have a MySQL database which stores articles. A sample article would look like this: CODE This
is a body. This is a body.This is a body.This is a body.This is a body.This is a body.This is a
body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This
is a body.This is a body.This is a body.This is a body. This is a body.This is a body.This is a
body.This is a body.This is a body.This is a body.This is a body.This is a body.This is a body.This
is a body.This is a body.This is a body.This is a body.This is a body. That'....
Putting Data Of 2 Pages In Mysql At Once
(1) suppose i have a page, page.php?part=1 there i have some text fields. user will give input, but
after taking input, it will not put the data in mysql .. but it will take to the next step..
page.php?part=2 (if any field is left blank, it will not go to next page.. ) . and there also some
fields.. after the user has filled that form also, then it will insert all data (from part1 and
part 2) in mysql. i want to ask, how i can collect data from 2 pages and put in mysql at once.....
How Good Is This Data Cleaning Function?
(2) Hi all, this is my first function and as part of a script and i just want to know a couple of
things. here is the code for the function: CODE <? function
clean($dirty_string) { $muddy_string = stripslashes($dirty_string);
$murky_string = strip_tags($muddy_string); $clean_string =
htmlentities($murky_string); }; ?> So the first thing is how secure is
it? the script this will be used in connects to a database and sends an email so it needs to stop
SQL injections and any email ab....
Loading Mysql Data Into A Table
(10) Hey i have a little problem with my php script. i dont really know how to make it work ^^; I want to
have this exact table: ' I made mysql table that has one column for id(auto-increment,
primary key), and then it has row and collumn and text. row means which row in the html table and
collumn wich collum. (obviously /tongue.gif" style="vertical-align:middle" emoid=":P" border="0"
alt="tongue.gif" />) here is the mysql table screenshoted from phpMyAdmin: r means row and c
collumn /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue....
Same 1 Registeration Data For Different Purposes
(4) I want to install 4 scripts on my website .. 1- Gallery 2-Classfied Ads 3-Game Cheats Script (A
simple script where ppl can register and then submit the cheats) 4-Php Nuke The problem is that all
of 4 scripts needs registeration of members (use 4 different databases).... I want that all the
member which is registered at one place can login at all of the services..i mean , one registeration
form , that can work for all.. how i can do it ? Please tell in details..thanks.....
Finding Data In Meta Tags
using php to search Meta Tags for data (0) In the Head portion of an Html file, there are usually several Meta Tags that contain data about
various things, like the tag for keywords, an Author's name or maybe a description field. Here
are two example Meta tags: HTML meta name =" Keywords " content=" keyword1, keyword2 " />
meta name =" Description " content=" A Description of the file's content is here " /> So,
what I have a question about concerns checking a file to see what information is included in these
tags and using that information as variables or content in the output of the page....
Listing From Table Row Data
Listing all members (5) Hello, it's been a while since i've been active in the PHP Board ( i used to be really
active in here ), not only to help others but also to request help ( people knowing those requests,
dont share your bad experience with my requests /tongue.gif' border='0'
style='vertical-align:middle' alt='tongue.gif' /> ) Anyway, i am requesting help on a listing of
members, i totally forgot about how to fetch the rows from a table and display each row, i thought
it was: CODE $result=mysql_query("SELECT * FROM $usertable ORDER BY id
DESC") or....
Help With Reading Files
Read and replace/insert data from form (5) Hi, Does anyone know how i can do this, or scripts that will work on Trap17's servers and will
do the following: I have a .doc file form. Which i want to have filled in automactically, by HTML
Form and emailed to my address, with the data filled in. Any ideas? I have heard many differing
things, like XML, RTF, DOC, PDF... I have serched through many places and come up empty handed with
anything that works. /sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /> ....
Form To Pdf, With Email?
Wanting to Submitt Data to PDF (3) Hi all, This sounds like a good place to ask this, I have a form Click Here to View that when
submitted will put the values into the PDF Here Is there a way in which to have the filled in
form both viewed to the user? and also have it emailed to me as an attachment. Any code or help
would be good... I get basics, but this stuff is hard to get to work and i can't get it to.....
Flash Games And Post Data
(0) i want to put a highscore section for a bunch of flash games on a website. i know that when most
games are done the score is in the post data, which can be viewed if you have the firefox live http
headers extension. but how would you insert the postdata from the flash games into the database?....
Looking for redirct, post, data
|
|
Searching Video's for redirct, post, data
|
advertisement
|
|