anto Posted December 18, 2009 Share Posted December 18, 2009 Dear All, I am newbie to php.I am creating some account registration pages for our website using php , mysql. for that iam using 3 pages in page1 i added all the fields for signup like(emailid,password,firstname,lastname,address1,address2,city,state,country.....). In page 2 i have written the php code to save sll the filled fields in page1 to mysql database table.In page 3 i want to dispaly the billing address from page1 and page 2(address1,address2,city,state,country) with some other fields to finish the registration. for that i am using the below code <?php session_start(); require_once("dbconnection.php"); echo $email_id=$_SESSION['usr_email']; //if(isset($_COOKIE['id'])) //$email_id=$_COOKIE['usr_email']; $an=mysql_fetch_array(mysql_query("select address1,address2,city,state,country,zip_code from personal_signup where email_id='$email_id' ")); ?> below i have attatched the page2 and page3. please give me a solution it's very urgent for me, thanks and regards, swathi. /****************PAGE2************/ <?php session_start(); require_once("dbconnection.php"); include("personal_signup1.php"); $fname=$_POST['fname']; $lname=$_POST['lname']; $usr_email=$_POST['usr_email']; $gender=$_POST['gender']; $usrpword=$_POST['usrpword']; $usrpword1=$_POST['usrpword1']; $addr_line01=$_POST['addr_line01']; $addr_line02=$_POST['addr_line02']; $city=$_POST['city']; $state=$_POST['state']; $country=$_POST['country']; $zip=$_POST['zip']; $mobile_number=$_POST['mobile_number']; //$usr_phone=$_POST['usr_phone']; $dt=$_POST['dt']; $month=$_POST['month']; $year=$_POST['year']; $date=$year."-".$month."-".$dt; $type=$_POST['type']; $count=mysql_num_rows(mysql_query("select email_id from personal_signup where email_id='$usr_email'")); if($count!=0) { header("Location: ./personal_signup.php?id=1"); exit; } // 2 is for sending confirmation message for pre signup Admin mysql_query("insert into personal_signup(email_id,password,fname,lname,address1,address2,city,state,country,zip_code,phone_number,dob) values('$usr_email','$usrpword','$fname','$lname','$addr_line01','$addr_line02','$city','$state','$country','$zip','$mobile_number','$date')"); $oldid=0; $q=mysql_fetch_array(mysql_query("select max(user_id) from user_table ")); $u_id= $q[0]; $u_id++; mysql_query("insert into user_table (user_id,email) values('$id','$usr_email')"); mysql_close($link); $_SESSION['email_id']=""; //$_SESSION ['email_id'] = $email_id; header("Location: ./personal_signup1.php"); ?> /***********************PAGE3*****************/ <?php session_start(); require_once("dbconnection.php"); echo $email_id=$_SESSION['usr_email']; //if(isset($_COOKIE['id'])) //$email_id=$_COOKIE['usr_email']; ?> <!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" xml:lang="en" lang="en"> <head> <title>Company title</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta name="robots" content="index,follow"/> <meta name="distribution" content="global"/> <meta name="description" content=""/> <meta name="keywords" content=""/> <link href="css/style.css" rel="stylesheet" type="text/css" media="screen" /> <link rel="stylesheet" href="css/style1.css" type="text/css" media="screen"> <link rel="stylesheet" href="css/style5.css" type="text/css" media="screen"> <script type="text/javascript" src="js/popup.js"></script> <script type="text/javascript" src="js/jquery_002.js"></script> <script type="text/javascript" src="js//custom.js"></script> <script type="text/javascript" src="js//jquery_003.js"></script> </head> <body> <div id="container"> <div id="header"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td><h1 id="logo"><a href="#" title="Company Title - return to the homepage">Company Logotip</a></h1></td> <td><h1 id="menu"><a href="#">contact</a> | <a href="#">search</a> | <a href="#">sitemap</a></h1></td> </tr> </table> </div> <div id="top_menu"> <div id="top"> <?php include("toplinks.php");?> <!-- end head--> <div id="main"> </div> <!--end top--> </div></div> <br /> <h2 align="left" style="margin-left:30px;">To make the most of your EvolPay account, enter your credit card <br />information</h2> <div id="main" style="height:auto"> <div id="personal-signup" style="width:auto"> <div class="input textarea"> <div id="content_box4" style="width:55%"> <form name="personal" method="post" action="personal_insert.php"> <table width="356" cellpadding="3" cellspacing="0" > <tr> <td height="24" colspan="2" align="" bgcolor="#FFFFFF"> </td> </tr> <tr> <td width="107" height="35" align="right">Creditcard Number: </td> <td width="226" ><input type="Text" id="ccard_num" name="ccard_num" size="25" maxlength="40" value="" onblur="return checkACNumeric();" /> <img src="images/logo_ccVisa.gif" /><img src="images/mastercard.gif" /></td> </tr> <tr> <td align="right">Expiration Date:</td> <td class="menubackgr" ><select id="dt" name="dt"> <option value=""> </option> <option value="01">01</option> <option value="02">02</option> <option value="03">03</option> <option value="04">04</option> <option value="05">05</option> <option value="06">06</option> <option value="07">07</option> <option value="08">08</option> <option value="09">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select id="month" name="month" style="width:50px"> <option value=""> </option> <option value="01">Jan</option> <option value="02">Feb</option> <option value="03">March</option> <option value="04">April</option> <option value="05">May</option> <option value="06">June</option> <option value="07">July</option> <option value="08">august</option> <option value="09">Sep</option> <option value="10">Oct</option> <option value="11">Nov</option> <option value="12">Dec</option> </select> <select id="year" name="year" style="width: 60px"> <option value=""> </option> <?php for($yy=1990;$yy<=2020;$yy++){?> <option value=<?php echo $yy;?>><?php echo $yy;?></option> <?php }?> </select> *</td> </tr> <tr> <td align="right" class="menubackgr" >CSC :</td> <td><input type="Text" id="ccard_num" name="csc" size="5" maxlength="10" value="" onblur="bankname()" /> <a href=""> What's this?</a></td> </tr> <tr> <td> </td> </tr> <tr> <td align="right" class="menubackgr" id="billing-address_label" >Billing Address : <?php $an=mysql_fetch_array(mysql_query("select address1,address2,city,state,country,zip_code from personal_signup where email_id='$email_id' ")); ?> <p><br /> </p> <p><br /> <!--<td><div id="billing-address-display"> <span><?php echo $an['address1'];?></span><br /> <span><?php echo $an['address2'];?></span><br /> <span><?php echo $an['city'];?>,</span><br /> <span class="region"><?php echo $an['state'];?></span><br /> <span><?php echo $an['country'];?></span><br /> <span><?php echo $an['zip_code'];?></span> </div><a href="" style="padding-left:60px"><font color="#C88039">Change</font></a></td> <td width="4"></td></tr> </p>--> <tr> <td height="28" colspan="2" align="center" class="menubackgr" ><input type="Hidden" name="type" value="<?php echo $type; ?>" /> <br /> <input name="Submit" type="Submit" value="Submit" /> <p></p></td> </tr> <tr> <td colspan="2" bgcolor="#FFFFFF"> </td> </tr> </table> </form> <p align="left"><a href="">Goto my account</a></p> </div> </div> <div align="right"> <div id="content_box4" style="width:45%"> <h3 align="center"><font size="3">Pay with my</font><br />credit card</h3> <p align="left">Pay right away - get set up in seconds.</p> <p align="left">Pay without exposing your card number to merchants.</p> <p align="left">No need to retype your credit card information.</p> </ul> </div></div> </div> </div> <p> </p> <div id="footer"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="11"><img src="images/footer_1.gif" width="11" height="30" alt="" /></td> <td><div id="footer_text">Copyright © EvolPay. All rights reserved.<a href="http://www.evolgence.com">Evolgence</a></div></td> <td width="10"><img src="images/footer_2.gif" width="10" height="30" alt="" /></td> </tr> </table> </div> </div> </body> </HTML> Quote Link to comment Share on other sites More sharing options...
cags Posted December 18, 2009 Share Posted December 18, 2009 If it's so urgent and you expect us to do it for you, perhaps you should have at least taken the time to respect the forums rules. Firstly you posted it in the wrong board, I really don't think it's that complicated to get things in the right place. Granted some topics are difficult to place, but since you placed it in the Regex sub-board. Your problem certainly doesn't seem to be related to Regex, in fact as far as I can tell you don't even have any Regex in your code. The amusing thing is the fact you've essentially shot yourself in the foot right from the off because the Regex forum is probably far less frequented than the PHP main board. I'll move the topic for you when I've posted this message. Secondly you posted large amounts of code without using code tags, this makes it a pain to read and will likely mean most people will completely skip over it. To use the tags you either click the button marked with a # above the box you type in or you place tags around your code. When posting code from multiple places I'd highly recommend posting in separate code tags. Quote Link to comment Share on other sites More sharing options...
Deoctor Posted December 18, 2009 Share Posted December 18, 2009 dear cags i think this guy had been asked by some one else to do it out(probably a girl!!! ) so he just copied the same and have pasted it here.. any way it is right wht ever u have told himm... @anto use the code tags and replace the code... Quote Link to comment Share on other sites More sharing options...
Deoctor Posted December 18, 2009 Share Posted December 18, 2009 i just went through ur code and wt ever u have written up. wht for solution should we give..is ur code not working or how is it happening?? can u explain in more detail Quote Link to comment Share on other sites More sharing options...
emopoops Posted December 18, 2009 Share Posted December 18, 2009 u need to make sure the query is on the same page as the posted vars hon Quote Link to comment Share on other sites More sharing options...
anto Posted December 19, 2009 Author Share Posted December 19, 2009 dear All, I am really sorry for my last post,i was just in hurry so i didn't follow the rules. Can you please hide my forum.. Regards, Anto Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.