468,247 Members | 1,262 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,247 developers. It's quick & easy.

Send variable's data from a form to another form

Hi, I'm a new PHP user so struggling a lot.

I know this is silly question for you but I'll appreciate if you can help
me.

Here is my code.

I need to send the data of $Sname in form1 to $Sname in form3.

#!/usr/local/bin/php
<html>
<head>
<title></title>
</head>
<body>
<?
if(!$_POST[vote]) {
if(!$_POST[build]) {

// form 1
?>
<form method="POST" target="_blank">
<input name=Sname>
<input type=submit name=build value="build the form">
</form>
<?
}
else
{
// form 2
?>
<form method="POST" target="_blank">
<?
echo $Sname;
echo "<input type=submit name=vote value=vote>";

mkdir($Sname,0777);
?>
</form>
<?
}}
else
{
// form 3
?>
<form method="POST">
<?
echo "$Sname";
?>
</form>
<?
}
?>
</body>
</html>

Jul 17 '05 #1
1 1530
"Akemi K. Buxton" <mi*****@verizon.net> wrote:
I need to send the data of $Sname in form1 to $Sname in form3.

// form 2
?>
<form method="POST" target="_blank">
<?
echo $Sname;
echo "<input type=\"hidden\" name=\"Sname\" value=\"".$Sname."\">";
echo "<input type=submit name=vote value=vote>";

mkdir($Sname,0777);
?>
</form>


HTH;
JOn
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Miguel Dias Moura | last post: by
9 posts views Thread by eswanson | last post: by
4 posts views Thread by Andrea De Santi | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.