mmarif4u Posted April 5, 2007 Share Posted April 5, 2007 Hi guys. I have page from where i get the package number and send it to the url. My url now look like this. "http://localhost/home/user.php?package=1006" Now in this user.php page the user fill the form , after this he submit the form. So it go to next page then fill another form there and go to next(last) page. So what i want is how i set the url to sent and get information rom page. In user.php coding if user fill form he rediected to next page. I use header fro that. But how to modify that header to go next page while the info is sn\ent through url . header("location:forms/form1.php"); I want to do it like this: header("location:user.php?$_GET['package']&$_GET['pack']"); but i am stuck with this. How could i do this. Thanks. Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/ Share on other sites More sharing options...
MadTechie Posted April 5, 2007 Share Posted April 5, 2007 change to <?php header("location:user.php?{$_GET['package']}&{$_GET['pack']}"); ?> Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221924 Share on other sites More sharing options...
mmarif4u Posted April 5, 2007 Author Share Posted April 5, 2007 Thanks MadTachei for reply. I try that but now page says it skip the 2nd page and directly go to next page. URl now like this: "http://localhost/home/forms/childform1.php?1006&" I think it should be: "http://localhost/home/user.php?package=1006&pack=1002" OR "http://localhost/home/forms/form1.php?package=1006&pack=1002" if i want to do it like this then it means that i will code in one page not multiple pages... "http://localhost/home/user.php?package=1006&pack=1002" Now i have three different pages which is called by eachother. Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221933 Share on other sites More sharing options...
jitesh Posted April 5, 2007 Share Posted April 5, 2007 header("location:user.php?package=".$_GET['package']."&pack=".$_GET['pack']); Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221934 Share on other sites More sharing options...
MadTechie Posted April 5, 2007 Share Posted April 5, 2007 oops my bad missed a bit try header("location:user.php?package={$_GET['package']}&pack={$_GET['pack']}"); Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221935 Share on other sites More sharing options...
$cripts Posted April 5, 2007 Share Posted April 5, 2007 header("form1.php?package={$_GET['package']}&pack={$_GET['pack']}"); Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221937 Share on other sites More sharing options...
mmarif4u Posted April 5, 2007 Author Share Posted April 5, 2007 Thanks for ur reply... To get the next info my content of that page willl this or i am wrong... Is it ok: <?php ob_start(); session_start(); $_GET['pack']; $_SESSION[$_GET['pack']]; include('forms/form.php'); ?> Thanks... Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221951 Share on other sites More sharing options...
MadTechie Posted April 5, 2007 Share Posted April 5, 2007 Use $_GET['package']; $_GET['pack']; Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221955 Share on other sites More sharing options...
mmarif4u Posted April 5, 2007 Author Share Posted April 5, 2007 Ok Let me be more clear: This is my 1st page: subscribe.php <?php session_start(); $package=array('1001','1006','1007'); $package[0]="images/subscribe now.gif"; $package[1]="images/subscribe now.gif"; $package[2]="images/subscribe now.gif"; $_SESSION['1001']=$package[0]; $_SESSION['1006']=$package[1]; $_SESSION['1007']=$package[2]; echo "<table align=\"center\" >"; echo "<tr>"; echo "<td align=\"center\" ><img src=\"images/logo1.jpg\"></img></td>"; echo "</tr>"; echo "<tr>"; echo "<td align=\"center\" ><img src=\"images/home.gif\"></img></td>"; echo "</tr>"; echo "</table>"; echo "<table width=\"73.8%\">"; echo "<tr>"; echo "<td width=\"44.5%\"> </td>"; echo "<td align=\"left\" width=\"9.8%\"><a href=\"user.php?package=1001\"><img src=\"{$_SESSION['1001']}\" border=\"0\"></img></a></td>"; echo "<td align=\"left\" width=\"9.8%\"><a href=\"user.php?package=1006\"><img src=\"{$_SESSION['1006']}\" border=\"0\"></img></a></td>"; echo "<td align=\"left\" width=\"9.8%\"><a href=\"user.php?package=1007\"><img src=\"{$_SESSION['1007']}\" border=\"0\"></img></a></td>"; echo "</tr>"; echo "</table>"; ?> <html><head><title>Subscribe Now</title></head> <body > </body> </html> this is my 2nd page. user.php <?php ob_start(); session_start(); include("include/db.php"); include("include/common.php"); //include("function.php"); //$ppackage="1002"; //$_SESSION['1002']=$ppackage; $_GET['package']; $_SESSION[$_GET['package']]; if($_GET['package'] == 1006){$package='1006'; } if($_GET['package'] == 1001){$package='1001'; } if($_GET['package'] == 1007){$package='1007'; }//{echo"$package";} if (!isset($_POST['submitok'])): ?> <!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" href="styles/style.css" type="text/css"> <Script> function doubleConfirm() { if (!confirm('R u sure to post the form.')) return false; if (!confirm('Please check again the form for errors.')) return false; return true; } </script> <title> New User Registration Form </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1> </head> <body bgcolor="#4572da"><center> <?php include ("forms/subsform.php")?> </body> </html> <?php else: $dbcnx = dbConnect('db'); $name=mysql_real_escape_string($_POST['nmanme']); $custic=mysql_real_escape_string($_POST['nmic']); ?> <?php header("location:user.php?package=".$_GET['package']."&cpackage=".$_GET['1002']); exit; endif; ?> This is the 3rd page. childform.php <?php ob_start(); session_start(); $_GET['package']; $_GET['pack']; $_SESSION[$_GET['pack']]; include('form1.php');?> So how can i set the urls now... Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221963 Share on other sites More sharing options...
MadTechie Posted April 5, 2007 Share Posted April 5, 2007 ooooooooooooooooooooooooooooooooook ??? Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221969 Share on other sites More sharing options...
mmarif4u Posted April 5, 2007 Author Share Posted April 5, 2007 Please any help will appreciated... Many thanks in advance.. I stuck with this and surf alot of time on this but no luck. Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221975 Share on other sites More sharing options...
jitesh Posted April 5, 2007 Share Posted April 5, 2007 ??? ??? ??? ??? ??? ??? Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-221976 Share on other sites More sharing options...
mmarif4u Posted April 5, 2007 Author Share Posted April 5, 2007 Any suggestions guys this one is very imporatnt to me. Please quick help will be appriciated... Link to comment https://forums.phpfreaks.com/topic/45686-_get-with-continues-pages/#findComment-222034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.