SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast chitara's Avatar
    Join Date
    Dec 2005
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Login problem after Registration

    Hello Everybody,

    Its me again after a loooooong break.


    I am developing an e-commerce website where I am facing problem with login problem.

    My flow is :

    customer add products to the basket --> press checkout buttom --> get a page with "new customer get register" and "returning customer sign in" --> in case of a new customer after getting the registration she/he will get the with the both new and returning option.


    But I got only the new customer page not included the login option.


    know it so simple but couldn't understand which things i am missing.

    Waiting for your response

    Thanks

  2. #2
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,510
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    How about some code?

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2008
    Location
    UK
    Posts
    51
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by guido2004 View Post
    How about some code?
    I second that. Without the code which is causing the problems you essentially asking a blindfolded person to build a house.
    My Blog/Site: Full On Design

  4. #4
    SitePoint Enthusiast chitara's Avatar
    Join Date
    Dec 2005
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pls check this url >>

    http://www.buyerxpo.com/s_products.php

    then add to basket and then checkout.

    as a new customer you need to register and then will login with the email n password.


    thanks
    Last edited by chitara; Feb 13, 2009 at 07:25.

  5. #5
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,510
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    I can't 'dd' to the basket (whatever 'dd' means ), but I don't need to see the result anyway. You explained your problem very well (at least I think I understand). But there is no way to help you without seeing your code.

    But I got only the new customer page not included the login option.
    The answer to this is: include the login option.
    Now I'm sure the real problem is you don't know HOW to do that. And that's why we need some code.

  6. #6
    SitePoint Enthusiast chitara's Avatar
    Join Date
    Dec 2005
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi,

    here goes the files and database>>


    Code:
    <!--  sign_in.php-->
    
    <?
    	session_start();
    
    	include("includes/connection.php");
    	include("includes/config.php");
    	$cart = $_SESSION['cart'];
    
    $sess= session_id();
    //echo $sess;
    
    ?>
    <html>
    <head>
    <title><?PHP echo $rowsettings['Title']?> -  Products</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="style.css" rel="stylesheet" type="text/css">
    
    
    <style type="text/css">
    <!--
    body {
    	margin-left: 0px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    -->
    </style>
    <script language="javascript" src="scripts.js" type="text/javascript"></script>
    </head>
    <body>
    
    	
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>
    		<?
    			include("header.php");
    		?>
    	
    	</td>
      </tr>
      
      
      <tr>
        <td>
    	<!-- Start of  Top Menu -->
    		
    		<?
    			include("searching_products.php");
    		?>	
    	
    	<!-- End of  Top Menu -->
    	
    	
    	</td>
      </tr>
      
      <tr>
        <td height="9">
    	
    	<?
    	include("top_banner.php");
    ?>
    
    </td>
      </tr>
      
      
    
    		<Tr>
    			<Td colspan="2">
    	
    
    
    <!-- Start of Sign In or Registration-->
    
    <table width="100%" border="0" cellspacing="3" cellpadding="3">
      <tr>
        <td width="1%">&nbsp;</td>
        <td width="48%">
    	
    		<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td rowspan="4" bgcolor="#EFEBBC">&nbsp;&nbsp;</td>
        <td bgcolor="#EFEBBC"></td>
        <td height="5" bgcolor="#EFEBBC"></td>
        <td rowspan="4" bgcolor="#EFEBBC">&nbsp;&nbsp;</td>
      </tr>
      <tr>
        <td height="30" colspan="2" bgcolor="#CF4401"><div class="title"><img src="images/box.png" width="26" height="15">New Customer</div></td>
        </tr>
      <tr>
        <td height="200" colspan="2" bgcolor="#FFFFFF">
    &nbsp;&nbsp;I am a new customer.<br>
    <br>
    
    
    &nbsp;&nbsp;By creating an account at Buyerxpo.com you will be able to shop faster, be up to date on an orders status, and keep track of the orders you have previously made.	<br>
    <br>
    <div align="right"><input type="image" name="submit" border="0" src="images/button_continue.gif" 
    alt="Buyerxpo - The safer, easier way to pay online"onClick="window.location='customerInfo.php?payid=<?=$paypid?>'"><img alt="" border="0" width="1" height="1" src="images/button_continue.gif" >&nbsp;&nbsp;</div><br>
    </td>
        </tr>
      <tr>
        <td height="5" colspan="2" bgcolor="#EFEBBC"><img  height="5"src="images/spacer.gif" alt="buyerxpo" /></td>
        </tr>
    </table>
    
    	</td>
        <td width="2%">&nbsp;</td>
        <td width="48%">
    
    	<?php
    //session_start();
    $paypid = $_GET['pid'];
    $payqty = $_GET['qty'];
    $pnum = $_GET['nm'];
    
    //echo "paypid" . $paypid;
    
    //$_SESSION['logged'] = 0; 
    if($_POST['submit'])
    {
    
    //include "../config/conn.php";
    
    $sql="select * from  customers where email ='" . $_POST["cid"] . "' and password='" . $_POST["cpwd"] . "'";
    
    $result=mysql_query($sql,$conn);
    
    if($row=mysql_fetch_array($result))
    {
    	$n1=$row["email"];
    
    	$n2=$row["password"];
    	
    }
    
    if($_POST['cid']==$n1 &&  $_POST['cpwd']==$n2)
    {
    
    //$_SESSION['logged']=1;
    			$_SESSION["custId"]=$n1;
    		
    die("");	
    
    } 
    }
    
    else
    {
    
    ?>
    
    
    	<form action="process.php" method="post">
    
    
    		<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td rowspan="4" bgcolor="#EFEBBC">&nbsp;&nbsp;</td>
        <td bgcolor="#EFEBBC"></td>
        <td height="5" bgcolor="#EFEBBC"></td>
        <td rowspan="4" bgcolor="#EFEBBC">&nbsp;&nbsp;</td>
      </tr>
      <tr>
        <td height="30" colspan="2" bgcolor="#CF4401"><div class="title"><img src="images/box.png" width="26" height="15">Returning Customer</div></td>
        </tr>
      <tr>
        <td width="100%" height="200" colspan="2" bgcolor="#FFFFFF">
    	
    
    &nbsp;&nbsp;I am a returning customer.<br>
    <br>
    &nbsp;&nbsp;<strong>E-mail Address: </strong><br>
    &nbsp;&nbsp;<input type="text" size="25" id="cid" name="cid" value=""/><br><br>
    
    
    &nbsp;&nbsp;<strong>Password: </strong><br>
    &nbsp;&nbsp;<input type="password" size="25" id="cpwd" name="cpwd" value=""/><br>
    
    <br>
    <br>
    <div align="right"> <input type="submit" class="buttonSkinA" name="submit" value="submit" >&nbsp;&nbsp;&nbsp;</div><br>
       <input type="hidden" value="<?=$paypid?>" name="pid">
     <input type="hidden" value="<?=$payqty?>" name="qid">
      <input type="hidden" value="<?=$pnum?>" name="pnum">
      <input type="hidden" value="<?=$n1?>" name="eid">
      <input type="hidden" value="<?=$n1?>" name="eid">
      <input type="hidden" value="<?=$sess;?>" name="cart">
        </tr>
      <tr>
        <td height="5" colspan="2" bgcolor="#EFEBBC"><img  height="5"src="images/spacer.gif" alt="buyerxpo" /></td>
        </tr>
    </table>
    <?php session_destroy(); ?>
    </form>
    </td>
        <td width="1%">&nbsp;</td>
      </tr>
    </table>
    
    <!-- End of Sign In or Registration-->
    
    <BR><BR>
    
    <?php
    	}
    
    ?>
    
    
    
    </Td></Tr>
    <?
    	include("footer.php");
    ?>
    
    </table>
    </body>
    </html>
    
    
    
    
    <!--  customerInfo.php -->
    
    
    <?
    	session_start();
    	include("includes/connection.php");
    	include("includes/config.php");
    
    ?>
    <html>
    <head>
    <title><?PHP echo $rowsettings['Title']?>  Customer Registration</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="style.css" rel="stylesheet" type="text/css">
    <link href="common.css" rel="stylesheet" type="text/css">
    <script language="JavaScript" type="text/javascript" src="js/checkout.js"></script>
    <style type="text/css">
    <!--
    body {
    	margin-left: 0px;
    	margin-top: 0px;
    	margin-right: 0px;
    	margin-bottom: 0px;
    }
    -->
    </style>
    
    <script language="javascript" src="scripts.js" type="text/javascript"></script>
    </head>
    <body>
    
    	
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td>
    		<?
    			include("header.php");
    		?>
    	
    	</td>
      </tr>
      
      
      <tr>
        <td>
    	<!-- Start of  Top Menu -->
    		
    		<?
    			include("searching.php");
    		?>	
    	
    	<!-- End of  Top Menu -->
    	
    	
    	</td>
      </tr>
      
      <tr>
        <td height="9">&nbsp;</td>
      </tr>
      
      
    
    		<Tr>
    			<Td colspan="2">
    	
    
    <table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
    <Tr>
    
    <td width="2%"></td>
    
    <td align="left" valign="top">
    <?php
    
    if(isset($_POST['submit']))
    {
    	 
    	//echo $totpaypid = $_GET['payid'];
    	  
    	  $_SESSION['txtShippingFirstName']=$_POST['txtShippingFirstName'];
    	  $_SESSION['txtShippingLastName']=$_POST['txtShippingLastName'];
    	  $_SESSION['txtShippingAddress1']=$_POST['txtShippingAddress1'];
    	  $_SESSION['txtShippingAddress2']=$_POST['txtShippingAddress2'];
    	  $_SESSION['txtShippingPhone']=$_POST['txtShippingPhone'];
    	  $_SESSION['txtShippingState']=$_POST['txtShippingState'];
    	  $_SESSION['txtShippingCity']=$_POST['txtShippingCity'];
    	  $_SESSION['txtShippingPostalCode']=$_POST['txtShippingPostalCode'];
    	  $_SESSION['txtShippingCountry']=$_POST['txtShippingCountry'];
    	  $_SESSION['txtPaymentFirstName']=$_POST['txtPaymentFirstName'];
    	  $_SESSION['txtPaymentLastName']=$_POST['txtPaymentLastName'];
    	  $_SESSION['txtPaymentAddress1']=$_POST['txtPaymentAddress1'];
    	  $_SESSION['txtPaymentAddress2']=$_POST['txtPaymentAddress2'];
    	  $_SESSION['txtPaymentPhone']=$_POST['txtPaymentPhone'];
    	  $_SESSION['txtPaymentState']=$_POST['txtPaymentState'];
    	  $_SESSION['txtPaymentCity']=$_POST['txtPaymentCity'];
    	  $_SESSION['txtPaymentPostalCode']=$_POST['txtPaymentPostalCode'];
    	  $_SESSION['txtPaymentCountry']=$_POST['txtPaymentCountry'];
    	  
    
          //$join_dt = date("d-m-Y");
    
    
    //$user_id=urldecode($_GET["user_id"]);
    
    $result2=mysql_query("Select * from customers where email = '" . $_POST["txtEmail"] . "' ",$conn);
    
    $n1=$_POST["txtEmail"];
    
    while($row=mysql_fetch_array($result2))
    {
    	if($n1 = $row["email"])
    	{
    		   ?>
    		   <script language="javascript">
    		   		alert('Email address already exists. Please choose another one');
    				history.back(0);
    		   </script>
    		   
    		   <?php
    	die();
    	}
    
    }
    
    $strSql="INSERT INTO `customers` (`email`,`password`,`ship_firstname`,`ship_lastname`,`ship_address1`,`ship_address2`,`ship_phone`,`ship_state`,`ship_city`,`ship_pcode`,`ship_country`,`bill_firstname`,`bill_lastname`,`bill_address1`,`bill_address2`,`bill_phone`,`bill_state`,`bill_city`,`bill_pcode`,`bill_country`,`customers_join_date`) 
    values('".$_POST["txtEmail"]. "','".$_POST["txtPwd"]. "','".$_POST["txtShippingFirstName"]. "', '".$_POST["txtShippingLastName"]. "', '".$_POST["txtShippingAddress1"].  "', '".$_POST["txtShippingAddress2"].  "', '".$_POST["txtShippingPhone"].  "', '".$_POST["txtShippingState"].  "', '".$_POST["txtShippingCity"].  "', '".$_POST["txtShippingPostalCode"].  "', '".$_POST["txtShippingCountry"].  "','".$_POST["txtPaymentFirstName"]. "', '".$_POST["txtPaymentLastName"]. "', '".$_POST["txtPaymentAddress1"].  "', '".$_POST["txtPaymentAddress2"].  "', '".$_POST["txtPaymentPhone"].  "', '".$_POST["txtPaymentState"].  "', '".$_POST["txtPaymentCity"].  "', '".$_POST["txtPaymentPostalCode"].  "', '".$_POST["txtPaymentCountry"]."', NOW())";
    
    
    mysql_query($strSql,$conn);
    
    //echo 'sql'.$strSql;
    
    
    /*print "<script>";
           print " self.location='sign_in.php"; 
              print "</script>";*/
    
    
    	//header("self.location: sign_in.php");
    			exit();
    	
    	
    	session_destroy();
    	/*echo "<div class='postingcontainer'>Thank you very much for registering as a Billboard user. A confirmation link has been sent to your email address. You will be asked to confirm your email address. Our business administrator will review your registration form and notify you swhen you have been accepted as a user of the Billboard.</div><br clear='all' /></div><div id='footer'><div class='inside'>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. placerat sodales tortor.    </div></div>";*/
    	
    
    die();
    } else {
    
    if ($_SESSION['txtShippingFirstName']=="")
    {
    
    	session_destroy();
    }
    
    ?>
    
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    		<Tr>
    		<Td width="9" height="26"><img src="images/bar-box_01.gif"></Td>
    		<Td background="images/bar-box_03.gif" class="heading">Customer's Information</Td>
    		<Td width="9" height="26"><img src="images/bar-box_05.gif"></Td>
    		</Tr>
    		
    		<Tr>
    		<Td background="images/bar-box_09.gif"></Td>
    		<Td background="images/bar-box_10.gif" class="bodycontent">
    		
    	
    <!--<table width="550" border="0" align="center" cellpadding="10" cellspacing="0">
        <tr>
            <td>Step 1 Of 3 : Enter Login, Shipping And Payment Information </td>
        </tr>
    </table>-->
    <p id="errorMessage"><?php echo $errorMessage; ?></p>
    
    <form name="custform" method="post" id="custform" action="sign_in.php" onSubmit="return userInputCheck(this)">
    
    <table width="550" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
            <tr class="entryTableHeader">
                <td colspan="2">Login Information</td>
            </tr>
            <tr>
                <td width="150" class="label">E-mail Address</td>
                <td class="content"><input class= signupfield name="txtEmail" type="text" class="box" id="txtEmail" size="30" maxlength="50" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Password</td>
                <td class="content"><input class= signupfield name="txtPwd" type="password" class="box" id="txtPwd" size="30" maxlength="50" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Confirm Password</td>
                <td class="content"><input class= signupfield name="txtCpwd" type="password" class="box" id="txtCpwd" size="30" maxlength="50" value=""></td>
            </tr>
        </table>
        <p>&nbsp;</p>
        <table width="550" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
            <tr class="entryTableHeader">
                <td colspan="2">Shipping Information</td>
            </tr>
            <tr>
                <td width="150" class="label">First Name</td>
                <td class="content"><input class= signupfield name="txtShippingFirstName" type="text" class="box" id="txtShippingFirstName" size="30" maxlength="50" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Last Name</td>
                <td class="content"><input class= signupfield name="txtShippingLastName" type="text" class="box" id="txtShippingLastName" size="30" maxlength="50" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Address1</td>
                <td class="content"><input class= signupfield name="txtShippingAddress1" type="text" class="box" id="txtShippingAddress1" size="50" maxlength="100" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Address2</td>
                <td class="content"><input class= signupfield name="txtShippingAddress2" type="text" class="box" id="txtShippingAddress2" size="50" maxlength="100" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Phone Number</td>
                <td class="content"><input class= signupfield name="txtShippingPhone" type="text" class="box" id="txtShippingPhone" size="30" maxlength="32" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Province / State</td>
                <td class="content"><input class= signupfield name="txtShippingState" type="text" class="box" id="txtShippingState" size="30" maxlength="32" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">City</td>
                <td class="content"><input class= signupfield name="txtShippingCity" type="text" class="box" id="txtShippingCity" size="30" maxlength="32" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Postal / Zip Code</td>
                <td class="content"><input class= signupfield name="txtShippingPostalCode" type="text" class="box" id="txtShippingPostalCode" size="10" maxlength="10" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Country</td>
                <td class="content"><select class= signupfield name=txtShippingCountry class="box" id="txtShippingCountry"><option value="" 
                              selected>please select</option><option 
                              value=1>afghanistan</option><option 
                              value=2>albania</option><option 
                              value=3>algeria</option><option value=4>american 
                              samoa</option><option value=5>andorra</option><option 
                              value=6>angola</option><option 
                              value=7>anguilla</option><option 
                              value=8>antarctica</option><option value=9>antigua and 
                              barbuda</option><option 
                              value=10>argentina</option><option 
                              value=11>armenia</option><option 
                              value=12>aruba</option><option 
                              value=13>australia</option><option 
                              value=14>austria</option><option 
                              value=15>azerbaijan</option><option 
                              value=16>bahamas</option><option 
                              value=17>bahrain</option><option 
                              value=18>bangladesh</option><option 
                              value=19>barbados</option><option 
                              value=20>belarus</option><option 
                              value=21>belgium</option><option 
                              value=22>belize</option><option 
                              value=23>benin</option><option 
                              value=24>bermuda</option><option 
                              value=25>bhutan</option><option 
                              value=26>bolivia</option><option value=27>bosnia and 
                              herzegowina</option><option 
                              value=28>botswana</option><option value=29>bouvet 
                              island</option><option value=30>brazil</option><option 
                              value=31>british indian ocean 
                              territory</option><option value=32>brunei 
                              darussalam</option><option 
                              value=33>bulgaria</option><option value=34>burkina 
                              faso</option><option value=35>burundi</option><option 
                              value=36>cambodia</option><option 
                              value=37>cameroon</option><option 
                              value=38>canada</option><option value=39>cape 
                              verde</option><option value=40>cayman 
                              islands</option><option value=41>central african 
                              republic</option><option value=42>chad</option><option 
                              value=43>chile</option><option 
                              value=44>china</option><option value=45>christmas 
                              island</option><option value=46>cocos (keeling) 
                              islands</option><option 
                              value=47>colombia</option><option 
                              value=48>comoros</option><option 
                              value=49>congo</option><option value=50>cook 
                              islands</option><option value=51>costa 
                              rica</option><option value=52>cote 
                              d'ivoire</option><option 
                              value=53>croatia</option><option 
                              value=54>cuba</option><option 
                              value=55>cyprus</option><option value=56>czech 
                              republic</option><option 
                              value=57>denmark</option><option 
                              value=58>djibouti</option><option 
                              value=59>dominica</option><option value=60>dominican 
                              republic</option><option value=61>east 
                              timor</option><option value=62>ecuador</option><option 
                              value=63>egypt</option><option value=64>el 
                              salvador</option><option value=65>equatorial 
                              guinea</option><option 
                              value=66>eritrea</option><option 
                              value=67>estonia</option><option 
                              value=68>ethiopia</option><option value=69>falkland 
                              islands (malvinas)</option><option value=70>faroe 
                              islands</option><option value=71>fiji</option><option 
                              value=72>finland</option><option 
                              value=73>france</option><option value=74>france, 
                              metropolitan</option><option value=75>french 
                              guiana</option><option value=76>french 
                              polynesia</option><option value=77>french southern 
                              territories</option><option 
                              value=78>gabon</option><option 
                              value=79>gambia</option><option 
                              value=80>georgia</option><option 
                              value=81>germany</option><option 
                              value=82>ghana</option><option 
                              value=83>gibraltar</option><option 
                              value=84>greece</option><option 
                              value=85>greenland</option><option 
                              value=86>grenada</option><option 
                              value=87>guadeloupe</option><option 
                              value=88>guam</option><option 
                              value=89>guatemala</option><option 
                              value=90>guinea</option><option 
                              value=91>guinea-bissau</option><option 
                              value=92>guyana</option><option 
                              value=93>haiti</option><option value=94>heard and mc 
                              donald islands</option><option 
                              value=95>honduras</option><option value=96>hong 
                              kong</option><option value=97>hungary</option><option 
                              value=98>iceland</option><option 
                              value=99>india</option><option 
                              value=100>indonesia</option><option value=101>iran 
                              (islamic republic of)</option><option 
                              value=102>iraq</option><option 
                              value=103>ireland</option><option 
                              value=104>israel</option><option 
                              value=105>italy</option><option 
                              value=106>jamaica</option><option 
                              value=107>japan</option><option 
                              value=108>jordan</option><option 
                              value=109>kazakhstan</option><option 
                              value=110>kenya</option><option 
                              value=111>kiribati</option><option value=112>korea, 
                              democratic people's republic of</option><option 
                              value=113>korea, republic of</option><option 
                              value=114>kuwait</option><option 
                              value=115>kyrgyzstan</option><option value=116>lao 
                              people's democratic republic</option><option 
                              value=117>latvia</option><option 
                              value=118>lebanon</option><option 
                              value=119>lesotho</option><option 
                              value=120>liberia</option><option value=121>libyan 
                              arab jamahiriya</option><option 
                              value=122>liechtenstein</option><option 
                              value=123>lithuania</option><option 
                              value=124>luxembourg</option><option 
                              value=125>macau</option><option value=126>macedonia, 
                              the former yugoslav republic of</option><option 
                              value=127>madagascar</option><option 
                              value=128>malawi</option><option 
                              value=129>malaysia</option><option 
                              value=130>maldives</option><option 
                              value=131>mali</option><option 
                              value=132>malta</option><option value=133>marshall 
                              islands</option><option 
                              value=134>martinique</option><option 
                              value=135>mauritania</option><option 
                              value=136>mauritius</option><option 
                              value=137>mayotte</option><option 
                              value=138>mexico</option><option value=139>micronesia, 
                              federated states of</option><option value=140>moldova, 
                              republic of</option><option 
                              value=141>monaco</option><option 
                              value=142>mongolia</option><option 
                              value=143>montserrat</option><option 
                              value=144>morocco</option><option 
                              value=145>mozambique</option><option 
                              value=146>myanmar</option><option 
                              value=147>namibia</option><option 
                              value=148>nauru</option><option 
                              value=149>nepal</option><option 
                              value=150>netherlands</option><option 
                              value=151>netherlands antilles</option><option 
                              value=152>new caledonia</option><option value=153>new 
                              zealand</option><option 
                              value=154>nicaragua</option><option 
                              value=155>niger</option><option 
                              value=156>nigeria</option><option 
                              value=157>niue</option><option value=158>norfolk 
                              island</option><option value=159>northern mariana 
                              islands</option><option 
                              value=160>norway</option><option 
                              value=161>oman</option><option 
                              value=162>pakistan</option><option 
                              value=163>palau</option><option 
                              value=164>panama</option><option value=165>papua new 
                              guinea</option><option 
                              value=166>paraguay</option><option 
                              value=167>peru</option><option 
                              value=168>philippines</option><option 
                              value=169>pitcairn</option><option 
                              value=170>poland</option><option 
                              value=171>portugal</option><option value=172>puerto 
                              rico</option><option value=173>qatar</option><option 
                              value=174>reunion</option><option 
                              value=175>romania</option><option value=176>russian 
                              federation</option><option 
                              value=177>rwanda</option><option value=178>saint kitts 
                              and nevis</option><option value=179>saint 
                              lucia</option><option value=180>saint vincent and the 
                              grenadines</option><option 
                              value=181>samoa</option><option value=182>san 
                              marino</option><option value=183>sao tome and 
                              principe</option><option value=184>saudi 
                              arabia</option><option 
                              value=185>senegal</option><option 
                              value=186>seychelles</option><option value=187>sierra 
                              leone</option><option 
                              value=188>singapore</option><option value=189>slovakia 
                              (slovak republic)</option><option 
                              value=190>slovenia</option><option value=191>solomon 
                              islands</option><option 
                              value=192>somalia</option><option value=193>south 
                              africa</option><option value=194>south georgia and the 
                              south sandwich islands</option><option 
                              value=195>spain</option><option value=196>sri 
                              lanka</option><option value=197>st. 
                              helena</option><option value=198>st. pierre and 
                              miquelon</option><option 
                              value=199>sudan</option><option 
                              value=200>suriname</option><option value=201>svalbard 
                              and jan mayen islands</option><option 
                              value=202>swaziland</option><option 
                              value=203>sweden</option><option 
                              value=204>switzerland</option><option value=205>syrian 
                              arab republic</option><option 
                              value=206>taiwan</option><option 
                              value=207>tajikistan</option><option 
                              value=208>tanzania, united republic of</option><option 
                              value=209>thailand</option><option 
                              value=210>togo</option><option 
                              value=211>tokelau</option><option 
                              value=212>tonga</option><option value=213>trinidad and 
                              tobago</option><option 
                              value=214>tunisia</option><option 
                              value=215>turkey</option><option 
                              value=216>turkmenistan</option><option value=217>turks 
                              and caicos islands</option><option 
                              value=218>tuvalu</option><option 
                              value=219>uganda</option><option 
                              value=220>ukraine</option><option value=221>united 
                              arab emirates</option><option value=222>united 
                              kingdom</option><option value=223>united 
                              states</option><option value=224>united states minor 
                              outlying islands</option><option 
                              value=225>uruguay</option><option 
                              value=226>uzbekistan</option><option 
                              value=227>vanuatu</option><option value=228>vatican 
                              city state (holy see)</option><option 
                              value=229>venezuela</option><option value=230>viet 
                              nam</option><option value=231>virgin islands 
                              (british)</option><option value=232>virgin islands 
                              (u.s.)</option><option value=233>wallis and futuna 
                              islands</option><option value=234>western 
                              sahara</option><option value=235>yemen</option><option 
                              value=236>yugoslavia</option><option 
                              value=237>zaire</option><option 
                              value=238>zambia</option><option 
                              value=239>zimbabwe</option></select>
    </td>
            </tr>
        </table>
        <p>&nbsp;</p>
        <table width="550" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
            <tr class="entryTableHeader">
                <td width="150">Payment Information</td>
                <td><input type="checkbox" name="chkSame" id="chkSame" value="checkbox" onClick="setPaymentInfo(this.checked);">
                    <label for="chkSame" style="cursor:pointer">Same as shipping information</label></td>
            </tr>
            <tr>
                <td width="150" class="label">First Name</td>
                <td class="content"><input class= signupfield name="txtPaymentFirstName" type="text" class="box" id="txtPaymentFirstName" size="30" maxlength="50" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Last Name</td>
                <td class="content"><input class= signupfield name="txtPaymentLastName" type="text" class="box" id="txtPaymentLastName" size="30" maxlength="50" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Address1</td>
                <td class="content"><input class= signupfield name="txtPaymentAddress1" type="text" class="box" id="txtPaymentAddress1" size="50" maxlength="100" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Address2</td>
                <td class="content"><input class= signupfield name="txtPaymentAddress2" type="text" class="box" id="txtPaymentAddress2" size="50" maxlength="100" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Phone Number</td>
                <td class="content"><input class= signupfield name="txtPaymentPhone" type="text" class="box" id="txtPaymentPhone" size="30" maxlength="32" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Province / State</td>
                <td class="content"><input class= signupfield name="txtPaymentState" type="text" class="box" id="txtPaymentState" size="30" maxlength="32" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">City</td>
                <td class="content"><input class= signupfield name="txtPaymentCity" type="text" class="box" id="txtPaymentCity" size="30" maxlength="32" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Postal / Zip Code</td>
                <td class="content"><input class= signupfield name="txtPaymentPostalCode" type="text" class="box" id="txtPaymentPostalCode" size="10" maxlength="10" value=""></td>
            </tr>
            <tr>
                <td width="150" class="label">Country</td>
                <td class="content"><select class= signupfield name=txtPaymentCountry class="box" id="v"><option value="" 
                              selected>please select</option><option 
                              value=1>afghanistan</option><option 
                              value=2>albania</option><option 
                              value=3>algeria</option><option value=4>american 
                              samoa</option><option value=5>andorra</option><option 
                              value=6>angola</option><option 
                              value=7>anguilla</option><option 
                              value=8>antarctica</option><option value=9>antigua and 
                              barbuda</option><option 
                              value=10>argentina</option><option 
                              value=11>armenia</option><option 
                              value=12>aruba</option><option 
                              value=13>australia</option><option 
                              value=14>austria</option><option 
                              value=15>azerbaijan</option><option 
                              value=16>bahamas</option><option 
                              value=17>bahrain</option><option 
                              value=18>bangladesh</option><option 
                              value=19>barbados</option><option 
                              value=20>belarus</option><option 
                              value=21>belgium</option><option 
                              value=22>belize</option><option 
                              value=23>benin</option><option 
                              value=24>bermuda</option><option 
                              value=25>bhutan</option><option 
                              value=26>bolivia</option><option value=27>bosnia and 
                              herzegowina</option><option 
                              value=28>botswana</option><option value=29>bouvet 
                              island</option><option value=30>brazil</option><option 
                              value=31>british indian ocean 
                              territory</option><option value=32>brunei 
                              darussalam</option><option 
                              value=33>bulgaria</option><option value=34>burkina 
                              faso</option><option value=35>burundi</option><option 
                              value=36>cambodia</option><option 
                              value=37>cameroon</option><option 
                              value=38>canada</option><option value=39>cape 
                              verde</option><option value=40>cayman 
                              islands</option><option value=41>central african 
                              republic</option><option value=42>chad</option><option 
                              value=43>chile</option><option 
                              value=44>china</option><option value=45>christmas 
                              island</option><option value=46>cocos (keeling) 
                              islands</option><option 
                              value=47>colombia</option><option 
                              value=48>comoros</option><option 
                              value=49>congo</option><option value=50>cook 
                              islands</option><option value=51>costa 
                              rica</option><option value=52>cote 
                              d'ivoire</option><option 
                              value=53>croatia</option><option 
                              value=54>cuba</option><option 
                              value=55>cyprus</option><option value=56>czech 
                              republic</option><option 
                              value=57>denmark</option><option 
                              value=58>djibouti</option><option 
                              value=59>dominica</option><option value=60>dominican 
                              republic</option><option value=61>east 
                              timor</option><option value=62>ecuador</option><option 
                              value=63>egypt</option><option value=64>el 
                              salvador</option><option value=65>equatorial 
                              guinea</option><option 
                              value=66>eritrea</option><option 
                              value=67>estonia</option><option 
                              value=68>ethiopia</option><option value=69>falkland 
                              islands (malvinas)</option><option value=70>faroe 
                              islands</option><option value=71>fiji</option><option 
                              value=72>finland</option><option 
                              value=73>france</option><option value=74>france, 
                              metropolitan</option><option value=75>french 
                              guiana</option><option value=76>french 
                              polynesia</option><option value=77>french southern 
                              territories</option><option 
                              value=78>gabon</option><option 
                              value=79>gambia</option><option 
                              value=80>georgia</option><option 
                              value=81>germany</option><option 
                              value=82>ghana</option><option 
                              value=83>gibraltar</option><option 
                              value=84>greece</option><option 
                              value=85>greenland</option><option 
                              value=86>grenada</option><option 
                              value=87>guadeloupe</option><option 
                              value=88>guam</option><option 
                              value=89>guatemala</option><option 
                              value=90>guinea</option><option 
                              value=91>guinea-bissau</option><option 
                              value=92>guyana</option><option 
                              value=93>haiti</option><option value=94>heard and mc 
                              donald islands</option><option 
                              value=95>honduras</option><option value=96>hong 
                              kong</option><option value=97>hungary</option><option 
                              value=98>iceland</option><option 
                              value=99>india</option><option 
                              value=100>indonesia</option><option value=101>iran 
                              (islamic republic of)</option><option 
                              value=102>iraq</option><option 
                              value=103>ireland</option><option 
                              value=104>israel</option><option 
                              value=105>italy</option><option 
                              value=106>jamaica</option><option 
                              value=107>japan</option><option 
                              value=108>jordan</option><option 
                              value=109>kazakhstan</option><option 
                              value=110>kenya</option><option 
                              value=111>kiribati</option><option value=112>korea, 
                              democratic people's republic of</option><option 
                              value=113>korea, republic of</option><option 
                              value=114>kuwait</option><option 
                              value=115>kyrgyzstan</option><option value=116>lao 
                              people's democratic republic</option><option 
                              value=117>latvia</option><option 
                              value=118>lebanon</option><option 
                              value=119>lesotho</option><option 
                              value=120>liberia</option><option value=121>libyan 
                              arab jamahiriya</option><option 
                              value=122>liechtenstein</option><option 
                              value=123>lithuania</option><option 
                              value=124>luxembourg</option><option 
                              value=125>macau</option><option value=126>macedonia, 
                              the former yugoslav republic of</option><option 
                              value=127>madagascar</option><option 
                              value=128>malawi</option><option 
                              value=129>malaysia</option><option 
                              value=130>maldives</option><option 
                              value=131>mali</option><option 
                              value=132>malta</option><option value=133>marshall 
                              islands</option><option 
                              value=134>martinique</option><option 
                              value=135>mauritania</option><option 
                              value=136>mauritius</option><option 
                              value=137>mayotte</option><option 
                              value=138>mexico</option><option value=139>micronesia, 
                              federated states of</option><option value=140>moldova, 
                              republic of</option><option 
                              value=141>monaco</option><option 
                              value=142>mongolia</option><option 
                              value=143>montserrat</option><option 
                              value=144>morocco</option><option 
                              value=145>mozambique</option><option 
                              value=146>myanmar</option><option 
                              value=147>namibia</option><option 
                              value=148>nauru</option><option 
                              value=149>nepal</option><option 
                              value=150>netherlands</option><option 
                              value=151>netherlands antilles</option><option 
                              value=152>new caledonia</option><option value=153>new 
                              zealand</option><option 
                              value=154>nicaragua</option><option 
                              value=155>niger</option><option 
                              value=156>nigeria</option><option 
                              value=157>niue</option><option value=158>norfolk 
                              island</option><option value=159>northern mariana 
                              islands</option><option 
                              value=160>norway</option><option 
                              value=161>oman</option><option 
                              value=162>pakistan</option><option 
                              value=163>palau</option><option 
                              value=164>panama</option><option value=165>papua new 
                              guinea</option><option 
                              value=166>paraguay</option><option 
                              value=167>peru</option><option 
                              value=168>philippines</option><option 
                              value=169>pitcairn</option><option 
                              value=170>poland</option><option 
                              value=171>portugal</option><option value=172>puerto 
                              rico</option><option value=173>qatar</option><option 
                              value=174>reunion</option><option 
                              value=175>romania</option><option value=176>russian 
                              federation</option><option 
                              value=177>rwanda</option><option value=178>saint kitts 
                              and nevis</option><option value=179>saint 
                              lucia</option><option value=180>saint vincent and the 
                              grenadines</option><option 
                              value=181>samoa</option><option value=182>san 
                              marino</option><option value=183>sao tome and 
                              principe</option><option value=184>saudi 
                              arabia</option><option 
                              value=185>senegal</option><option 
                              value=186>seychelles</option><option value=187>sierra 
                              leone</option><option 
                              value=188>singapore</option><option value=189>slovakia 
                              (slovak republic)</option><option 
                              value=190>slovenia</option><option value=191>solomon 
                              islands</option><option 
                              value=192>somalia</option><option value=193>south 
                              africa</option><option value=194>south georgia and the 
                              south sandwich islands</option><option 
                              value=195>spain</option><option value=196>sri 
                              lanka</option><option value=197>st. 
                              helena</option><option value=198>st. pierre and 
                              miquelon</option><option 
                              value=199>sudan</option><option 
                              value=200>suriname</option><option value=201>svalbard 
                              and jan mayen islands</option><option 
                              value=202>swaziland</option><option 
                              value=203>sweden</option><option 
                              value=204>switzerland</option><option value=205>syrian 
                              arab republic</option><option 
                              value=206>taiwan</option><option 
                              value=207>tajikistan</option><option 
                              value=208>tanzania, united republic of</option><option 
                              value=209>thailand</option><option 
                              value=210>togo</option><option 
                              value=211>tokelau</option><option 
                              value=212>tonga</option><option value=213>trinidad and 
                              tobago</option><option 
                              value=214>tunisia</option><option 
                              value=215>turkey</option><option 
                              value=216>turkmenistan</option><option value=217>turks 
                              and caicos islands</option><option 
                              value=218>tuvalu</option><option 
                              value=219>uganda</option><option 
                              value=220>ukraine</option><option value=221>united 
                              arab emirates</option><option value=222>united 
                              kingdom</option><option value=223>united 
                              states</option><option value=224>united states minor 
                              outlying islands</option><option 
                              value=225>uruguay</option><option 
                              value=226>uzbekistan</option><option 
                              value=227>vanuatu</option><option value=228>vatican 
                              city state (holy see)</option><option 
                              value=229>venezuela</option><option value=230>viet 
                              nam</option><option value=231>virgin islands 
                              (british)</option><option value=232>virgin islands 
                              (u.s.)</option><option value=233>wallis and futuna 
                              islands</option><option value=234>western 
                              sahara</option><option value=235>yemen</option><option 
                              value=236>yugoslavia</option><option 
                              value=237>zaire</option><option 
                              value=238>zambia</option><option 
                              value=239>zimbabwe</option></select></td>
            </tr>
        </table>
        <p>&nbsp;</p>
        
        <p align="center">
    					
    			<!-- <input type="hidden" value="<?=$_POST['txtEmail']?>" name="mail">-->
           <input type="submit" name="submit" value="submit" >
        </p>
    </form> </Td>
    		<Td background="images/bar-box_11.gif"></Td>
    		</Tr>
    		
    		<Tr>
    		<Td width="9" height="13"><img src="images/bar-box_15.gif"></Td>
    		<Td background="images/bar-box_16.gif"></Td>
    		<Td width="9" height="13"><img src="images/bar-box_17.gif"></Td>
    		</Tr>
    	</table>
    	
    	<br>
    
    <?php
    		
    	}	
    
    ?>
    
    </td>
    <td width="2%"></td>
    
    </Tr>
    </table>
    
    
    
    
    
    </Td></Tr>
    <?
    	include("footer.php");
    ?>
    
    </table>
    </body>
    </html>

    -- phpMyAdmin SQL Dump
    -- version 2.6.0-pl3
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Feb 13, 2009 at 02:35 PM
    -- Server version: 4.1.10
    -- PHP Version: 4.3.11
    --
    -- Database: `tradekey`
    --

    -- --------------------------------------------------------

    --
    -- Table structure for table `customers`
    --

    CREATE TABLE `customers` (
    `custId` int(11) NOT NULL auto_increment,
    `email` varchar(50) NOT NULL default '',
    `password` varchar(50) NOT NULL default '',
    `ship_firstname` varchar(50) NOT NULL default '',
    `ship_lastname` varchar(50) NOT NULL default '',
    `ship_address1` varchar(80) NOT NULL default '',
    `ship_address2` varchar(80) NOT NULL default '',
    `ship_phone` varchar(30) NOT NULL default '',
    `ship_state` varchar(30) NOT NULL default '',
    `ship_city` varchar(50) NOT NULL default '',
    `ship_pcode` varchar(15) NOT NULL default '',
    `ship_country` varchar(80) NOT NULL default '',
    `bill_firstname` varchar(50) NOT NULL default '',
    `bill_lastname` varchar(50) NOT NULL default '',
    `bill_address1` varchar(80) NOT NULL default '',
    `bill_address2` varchar(80) NOT NULL default '',
    `bill_phone` varchar(30) NOT NULL default '',
    `bill_state` varchar(30) NOT NULL default '',
    `bill_city` varchar(50) NOT NULL default '',
    `bill_pcode` varchar(15) NOT NULL default '',
    `bill_country` varchar(80) NOT NULL default '',
    `customers_join_date` datetime default NULL,
    PRIMARY KEY (`custId`)
    ) ;

  7. #7
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,510
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    Wow, that's a great mix of html, php and javascript, with table layout to top it off
    Sorry, but I don't have the time right now to go through all that (business is calling). At first sight, I guess it should always show both options, but maybe I'm missing something.

    Another thing, you really should take a look into CSS based layout, and templates.

  8. #8
    SitePoint Addict lmasi02's Avatar
    Join Date
    Aug 2004
    Location
    Zambia
    Posts
    257
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi
    MAke your login check from db simpler and there is a die() after the successfull login. advise why there is a die()

    this would make it easier
    <?php
    $sql="select * from customers where email ='" . $_POST["cid"] . "'";

    $result=mysql_query($sql,$conn);

    if($row=mysql_fetch_array($result)){
    if($row["password"]==$_POST["cpwd"]){
    ##succesful login
    }
    else{
    #failure
    }
    }
    else
    # not registered

    ?>
    Power of Knowledge


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •