PHP - Payubiz Payment Gateway Success Page Return Blank Page
I am using Magento (Ver 1.9.x) If i try with my localhost success url like, http://192.168.1.65/magento/index.php/checkout/onepage/success/ and return success message with order id. if i try with live, success url like, https://abc.in/payubiz/redirect/success/ success page like blank page. How to solve the issue? Code : https://github.com/ZusZus/Payubiz Edited February 4, 2020 by aveevaSimilar TutorialsHere is my code : https://paiza.io/projects/SUiG5qp_wttfcrQn-0Mwew?language=php FYI -> [index.htm -> LineNo : 781 & 782] After successfully received payment response page return 404 error The form & CC-Avenue Payment Gateway Request page working good, after customer paid the response page return 404 error. How can i solve the error? Edited May 22, 2019 by aveevaI am using Payeezy Payment Gateway, how to integrate with my PHP page, actually the payment gateway for my customer form, i done with form using PHP, how can i integrate Payeezy Payment Gateway with my PHP form. on my index page, I have a form with the action of formData.php which is this code Code: [Select] <?php include("includes/connection.php"); //opens the database connection //connection.php //function connect() { //global $mysql; //$mysql = new MySQLi('localhost','user','password','billPay') or die('couldn not connect'. mysql_error()); //} connect(); if(isset($_POST['submit'])){ $firstName = $_POST['firstName']; $lastName = $_POST['lastName']; $companyName = $_POST['companyName']; $homePhone = $_POST['homePhone']; $cellPhone = $_POST['cellPhone']; $companyPhone = $_POST['companyPhone']; } $insert = $mysql->query("INSERT INTO names('firstName','lastName','companyName'), phone('home','cell','company') values('$firstName','$lastName','$companyName','$homePhone','$cellPhone','$companyPhone'"); if($insert){ echo "success!"; } else { mysql_error(); } ?> when I push the insert button, it goes to the formData.php page like it should be instead of giving an error or a success message, it's blank. hi , i have an error in my php . It will display successful only if all file being upload , if there have one file not upload . it go to blankpage not tell any error or success.I have file that being upload to different path folder
$fileName14 = basename($_FILES["penaja"]["name"]); $targetFilePath14=$targetDir14. $fileName14; $fileType14 = pathinfo($targetFilePath14,PATHINFO_EXTENSION); $allowTypes14= array('pdf','PDF','docx','DOCX'); //kesihatan $targetDir15 ="folder/pda-semakan/kesihatan/"; $fileName15 = basename($_FILES["umpapkp"]["name"]); $targetFilePath15=$targetDir15. $fileName15; $fileType15 = pathinfo($targetFilePath15,PATHINFO_EXTENSION); $allowTypes15= array('pdf','PDF','docx','DOCX'); //jhepa $targetDir16 ="folder/pda-semakan/jhepa/"; $fileName16 = basename($_FILES["umpajhepa"]["name"]); $targetFilePath16=$targetDir16. $fileName16; $fileType16 = pathinfo($targetFilePath16,PATHINFO_EXTENSION); $allowTypes16= array('pdf','PDF','docx','DOCX'); if(in_array($fileTypeg, $allowTypesg)){ if(in_array($fileType, $allowTypes)){ if(in_array($fileType1, $allowTypes1)){ if(in_array($fileType2, $allowTypes2)){ if(in_array($fileType3, $allowTypes3)){ if(in_array($fileType4, $allowTypes4)){ if(in_array($fileType5, $allowTypes5)){ if(in_array($fileType6, $allowTypes6)){ if(in_array($fileType7, $allowTypes7)){ // Upload file to server if(move_uploaded_file($_FILES["gambar"]["tmp_name"], $targetFilePathg)){ if(move_uploaded_file($_FILES["surat"]["tmp_name"], $targetFilePath)){ if(move_uploaded_file($_FILES["ic"]["tmp_name"], $targetFilePath1)){ if(move_uploaded_file($_FILES["sijilkelahiran"]["tmp_name"], $targetFilePath2)){ if(move_uploaded_file($_FILES["sijilspm"]["tmp_name"], $targetFilePath3)){ if(move_uploaded_file($_FILES["sijilberhenti"]["tmp_name"], $targetFilePath4)){ if(move_uploaded_file($_FILES["sijilmatrik"]["tmp_name"], $targetFilePath5)){ if(move_uploaded_file($_FILES["sejulai"]["tmp_name"], $targetFilePath6)){ if(move_uploaded_file($_FILES["bmjulai"]["tmp_name"], $targetFilePath7)){
Hi, Is there any one has integrated securenet payment gateway in php? Is yes, can any one provide me HTML code and php code for it? Looking foward Hi guys, I just want to know if any one has worked with streamline payment gateway before, we are building a cart for a customer, a in house built sulition, and just wanted some help / advice on how to process payments. The customer has picked streamline as their merchant Thank you Hi guys, I'm not really experienced with PHP to a high degree, very very basic knowledge. I took a website for a client which was an e-commerce website in need of a re-host? Sounds Simple enough. However when uploading the site i found it went to a secure server outside of the one I was hosting it on when it came to submitting the payment. I then had to get access to these files and get them working on locally on my server. This where I'm having trouble... It's easier to show you the problems rather than try and explain them. This is the original working version of the payment page: https://secure.wilkesdesign.com/egowear/pay.php And this is my version: http://www.egowear.co.uk/payment/pay.php Which is essentially a duplicate, all I have changed is the details for it accessing the database on the the server which is included in "inc_db.php" As well as updating the link in protx.php to the correct TermUrl. The rest is the same as the original If you go to the first page and enter no details and just click "Make Payment" at the bottom of the page, you should get several validation errors appear in red at the top of the page. Do exactly the same on my version, the second link. And nothing seems to happen, no errors nothing. I'll admit i'm quite out of my depth here now, and I'm betting it's just me missing something obvious. So if anyone has any ideas I'd really appreciate it . Best Regards Chris Source code for pay.php: Code: [Select] <?php ini_set('display_errors','1'); ini_set('display_startup_errors','1'); error_reporting(E_ALL ^ E_NOTICE); $homeURL = "http://www.egowear.co.uk/"; //$homeURL = "http://intranet.wilkesdb.com/ego/"; // include at the start of the script being called. //error_reporting(E_ALL); ini_set('display_errors', '1'); $asId = 1; include "includes/inc_db.php"; $db = new DB; $db1 = new DB; $vatRate = $db->getval("SELECT glValue FROM globals WHERE glId=1","glValue")+0; $xorCountry = 2; $orDelCountry="UK"; $orPayNote='Unconfirmed'; $orPaid=0.00; $header = "MIME-Versin: 1.0\r\n" . "Content-type: text/plain; charset=ISO-8859-1; format=flowed\r\n" . "From: Egowear <sales@egowear.co.uk>\r\n"; $header .= "Reply-To: Egowear <sales@egowear.co.uk>\r\n"; $header .= "X-Mailer: PHP/" . phpversion() . "\r\n"; if($basketURL) { $basketArray = double_explode(":","|",$basketURL); //print_r($basketArray); $subTotal=$discount=$orDelCharge=0; $items = $subTotal = $totalWeight = 0; foreach ($basketArray as $key => $val) { $extraCost = 0; $prId = $val[0]; $qty = $val[1]; $prSize=$val[2]; $prColour=$val[3]; $extraCost = $val[5]; $db->query("SELECT prtName, prtPrice, prtImage, prColour, prPrtId, prVatable, IF(prWeight>0,prWeight,prtWeight) weight FROM products, prtypes WHERE prId='$prId' AND prtId=prPrtId"); $db->next_record(); list($prtName, $prPrice, $prtImage, $prColour, $prPrtId, $prVatable, $weight) = $db->Record; $prPrice = $prPrice + $extraCost; if($prVatable) $prPrice = calcVat($prPrice); $totalWeight += $qty*$weight; $items += $qty; $lineTotal = $qty*$prPrice; $subTotal += $lineTotal; } // calulate delivery (use function!!!!) $orDelChargeArray = getDelCharge($totalWeight, $xorCountry); //var_dump($orDelChargeArray); $deliveryTypesCount = count($orDelChargeArray); //echo "count: $deliveryTypesCount"; if (!$deliveryTypesCount) $orDelCharge = -1; elseif ($deliveryTypesCount==1) { list($crType) = array_keys($orDelChargeArray); $orDelCharge = $orDelChargeArray[$crType]; } if ($delOverride) $orDelCharge = $delOverride; $orVcId=0; if($xcnId) { $voucherCode = $db->getval("SELECT cnCurrentVoucherCode FROM contacts WHERE cnId='$xcnId'","cnCurrentVoucherCode"); if($voucherCode) { list($valid, $offerDescription, $vcDiscountPercent, $vcDiscountValue, $vcFreePostage, $vcMinValue, $orVcId) = validateVoucherCode($voucherCode, $xcnId); if($valid) { if($vcFreePostage) $orDelCharge=0; if($vcDiscountPercent>0) { if(!($vcMinValue>0) || ($subTotal>=$vcMinValue)) $discount = $subTotal*($vcDiscountPercent/100); } if($vcDiscountValue>0) { if(!($vcMinValue>0) || ($subTotal>=$vcMinValue)) $discount = $vcDiscountValue; } } } } $orTotal = round($subTotal+$orDelCharge-$discount,2); //$orTotal = round($subTotal*1.175,2); //echo formatnumber($subTotal).",".formatnumber($orDelCharge).",".formatnumber($discount); //$orTotal=0.01; } //echo "$subTotal<br />$orDelCharge<br />"; //echo "$orTotal<br />"; if ($sbmt) { // not used but leave in just in case!! if ($paypalOK) $ignorePayment = 1; // go with payment processing // first validate // validate fields if ($action!="callback") { if (strlen($cardHolder) < 2) $error = " • Enter the name as it appears on your card <br>"; if (!ereg("^[0-9]{10,20}", $cardNumber)) $error .= " • Please enter a valid card number <br>"; if ($startDate AND !ereg("^[0-9]{2}[0-9]{2}", $startDate)) $error .= " • Your start date is invalid <br>"; if (!ereg("^[0-9]{2}[0-9]{2}", $expiryDate)) $error .= " • Your expiry date is invalid <br>"; $billingAddress = $ccAddress1."\n\r".$ccAddress2."\n\r".$ccAddress3."\n\r".$ccTown; //if (strlen($billingAddress) < 10) $error .= " • Enter a valid billing address <br>"; $ccPostcode = strtoupper($ccPostcode); if($orDelCountry == "UK") { //if (!ereg("^[A-Z]{1,2}[0-9]{1,2}[A-Z]{0,1}[[:space:]][0-9]{1}[A-Z]{2}", $ccPostcode)) $error .= " • Enter a valid billing postcode. (Ensure that you have included the space!) <br>"; } if (!ereg("^[0-9]{3,4}", $CV2)) $error .= " • You have missed out your CV2 number<br>"; $orDelPostcode = strtoupper($orDelPostcode); //if ($orDelCountry == "UK") if (!ereg("^[A-Z]{1,2}[0-9]{1,2}[A-Z]{0,1}[[:space:]][0-9]{1}[A-Z]{2}", $orDelPostcode)) $error .= " • Your delivery postcode is invalid. (Ensure that you have included the space!) <br>"; // check if UK and BT (i.e. NI postcode) - should do this as part of the delivery package. //if ($orDelCountry == "UK" && substr($orDelPostcode, 0, 2) == "BT") $error .= " • You have selected UK postage. 'BT' postcodes are Northern Ireland and have different rates from mainland UK. Please click 'Cancel' and sellect the correct postal type."; if (strlen($orName) < 2) $error .= " • Please enter a customer name<br>"; if (strlen($orTel) < 5) $error .= " • Please tell us your telephone number<br>"; //if (strlen($orDelAddress1) < 2 || strlen($orDelTown) < 2) $error .= " • Please enter a valid customer address<br />"; if ($cnUsername) { $chkCnId = $db->getval("SELECT cnId FROM contacts WHERE cnUsername = '$cnUsername'", "cnId"); if ($cnUsername AND $chkCnId AND $chkCnId != $cnId) $error .= " • Your username is already in use by someone else. Please try another<br />"; } } //end if not callback // if(!eregi('^([a-z0-9\._-])+@([^\.]+\.[^\.]+)', $cnEmail, $matched)) $error .= " • Enter a valid email address<br>"; // second go with payment if (!$error) { /////////////////////////////////////// Payment not started yet so create order /////////////////////////////////// if(!isset($_GET['action']) && !($orId)) { //Add order if($xcnId>0) { // update contact $db->query("UPDATE contacts SET cnName='$cardHolder', cnEmail='$orEmail', cnAddress1='$ccAddress1', cnAddress2='$ccAddress2', cnAddress3='$ccAddress3', cnTown='$ccTown', cnPostcode='$ccPostcode' WHERE cnId='$xcnId'"); } else { $db->query("INSERT INTO contacts SET cnName='$cardHolder', cnUsername='$cnUsername', cnPassword='$cnPassword', cnEmail='$orEmail', cnAddress1='$ccAddress1', cnAddress2='$ccAddress2', cnAddress3='$ccAddress3', cnTown='$ccTown', cnPostcode='$ccPostcode', cnGroups='$cnGroups', cnPrefs='$cnPrefs'"); $xcnId = mysql_insert_id(); } if ($paypalOK) $orStatus = "Check Paypal Payment"; else $orStatus = "Payment Pending"; $db->query("INSERT INTO orders SET orCnId='$xcnId', orName='$orName', orDelAddress1='$orDelAddress1', orDelAddress2='$orDelAddress2', orDelAddress3='$orDelAddress3', orDelTown='$orDelTown', orDelCounty='$orDelCounty', orDelPostcode='$orDelPostcode', orDelCountry='$orDelCountry', orEmail='$orEmail', orDate=NOW(), orDelCharge='$orDelCharge', orDelType='$orDelType', orStatus='$orStatus', orVcId='$orVcId', orPayNote='$orPayNote', orPaid='$orPaid', orTotal='$orTotal', orDiscount='$discount', orTel='$orTel', orVatRate='$vatRate'"); $orId = mysql_insert_id(); $orVat=$orNet=0; foreach ($basketArray as $key => $val) { $flexString=""; $prId = $val[0]; $qty = $val[1]; $prSize=$val[2]; $flexString=$val[3]; $oiVat=$oiNet=0; $db->query("SELECT prtName, prtPrice, prtImage, prColour, prPrtId, prVatable, IF(prWeight>0,prWeight,prtWeight) weight FROM products, prtypes WHERE prId='$prId' AND prtId=prPrtId"); $db->next_record(); list($prtName, $prPrice, $prtImage, $prColour, $prPrtId, $prVatable, $weight) = $db->Record; $oiNet=$prPrice; if($prVatable) { $prPrice = calcVat($prPrice); $oiVat=$prPrice-$oiNet; $orVat+=$oiVat; } else $oiVat=0; if($qty) { $db->query("INSERT INTO orderitems SET oiOrId='$orId', oiPrId='$prId', oiQty='$qty',oiSize='$prSize',oiColour='$prColour', oiWidth='$prWidth',oiVat='$oiVat',oiNet='$oiNet',oiPriceEach='$prPrice', oiName='$prtName', oiFlexString='$flexString'"); $lineTotal = $qty*$prPrice; } } } $db->query("UPDATE orders SET orVat='$orVat', orNet='$orNet' WHERE orId='$orId'"); $vendorTxCode = "Order_".$orId; $billingAddress = substr($ccAddress1."\n\r".$ccAddress2."\n\r".$ccAddress3."\n\r".$ccTown,0,199); include("includes/protx.php"); $data = array ( 'VPSProtocol' => '2.22', 'TxType' => 'PAYMENT', 'Vendor' => 'egowear', 'VendorTxCode' => substr(substr($vendorTxCode,0,40-strlen(time())).'_'.time(),0,40), 'Amount' => number_format($orTotal,2), 'Currency' => "GBP", 'Description' => substr("Egowear Website Order: (".trim($typeDescrip).")",0,99), 'CardHolder' => substr($cardHolder,0,50), 'CardNumber' => substr($cardNumber,0,20), 'StartDate' => substr($startDate,0,4), 'ExpiryDate' => substr($expiryDate,0,4), 'IssueNumber' => substr($issueNumber,0,2), 'CV2' => substr($CV2,0,4), 'CardType' => substr($cardType,0,15), 'BillingAddress' => substr($billingAddress,0,199), 'BillingPostCode' => substr($ccPostcode,0,10), 'CustomerName' => substr($orName,0,99), 'CustomerEMail' => substr($orEmail,0,254), 'ContactNumber' => substr("",0,20), 'ClientIPAddress'=>$_SERVER['REMOTE_ADDR'] ); //echo $vendorTxCode; if($data) $optRequest = formatData($data); /////////////////////////////////////// Protx.php /////////////////////////////////// if(!isset($_GET['action'])) { $p = null; $response1 = _CompletePayment($p,$Vars,$optRequest,$orId); if(substr($response1,0,6)=="iframe") $iframecode=substr($response1,6); else if($response1) $error.=$response1; else $iframecode=0; } else if($_GET['action'] == 'callback') { $error .= __VerifyCallback($_POST, $Vars,null,$orId); } else if($_GET['action'] == 'callbacktest') { $optRequest = '... .. '; __VerifyCallback($p = null, $Vars, $optRequest); } else { $error.=('Invalid action'); } } // no error } else { // end submit if($xcnId && !$error && !$cardHolder) { $db->query("SELECT cnName, cnAddress1, cnAddress2, cnAddress3, cnTown, cnPostcode FROM contacts WHERE cnId='$xcnId'"); $db->next_record(); list($cardHolder, $ccAddress1, $ccAddress2, $ccAddress3, $ccTown, $ccPostcode) = $db->Record; /*$orName = $cardHolder; $orDelAddress1 = $ccAddress1; $orDelAddress2 = $ccAddress2; $orDelAddress3 = $ccAddress3; $orDelTown = $ccTown; $orDelPostcode = $ccPostcode;*/ } } // end no submit if($iframecode) echo $iframecode; else { ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Egowear</title> <link rel="stylesheet" type="text/css" href="includes/default.css"> <script language="javascript"> function goCopy() { document.getElementById('cardHolder').value = document.getElementById('orName').value; document.getElementById('ccAddress1').value = document.getElementById('orDelAddress1').value; document.getElementById('ccAddress2').value = document.getElementById('orDelAddress2').value; document.getElementById('ccAddress3').value = document.getElementById('orDelAddress3').value; document.getElementById('ccTown').value = document.getElementById('orDelTown').value; document.getElementById('ccPostcode').value =document.getElementById('orDelPostcode').value; } </script> <!--[if lt IE 7]><script defer type="text/javascript" src="pngfix.js"></script><![endif]--> </head> <body> <div align="center"> <? include "includes/nav.php"; ?> <div id="wrapper2" style="position:relative;z-index:1;top:25px"> <div align="left" id="<?= $theme ?>"> <div style="text-align:left;padding:18px 0px 0px 18px;overflow:hidden;"> <div style="float:right;padding:20px 160px 0px 0px;border:0px solid #000;width:535px;text-align:center;height:25px"> <h1><?= $wcTitle ?></h1> </div> <div><img src="images/logo.jpg" /></div> </div> <div align="left" class="pageMiddle"> <div style="position:relative;z-index:1;padding:2px 30px 10px 32px;" > <h1>Card Payment</h1> <form name="form1" method="post" action=""> <table id="tableSubCategories" style="width:100%;text-align:left;"> <tr id="trColumnTitles" > <td colspan="2" style=""><div style="background:#FF0000; color:#FFFFFF; font-weight:bold"><? echo $error ?></div></td> </tr> <tr id="trColumnTitles" > <td colspan="2" style="background-color:#CCC"> <strong>Delivery Address:</strong></td> </tr> <tr > <td style="width:45%"><div align="right">Name*:</div></td> <td><input name="orName" type="text" id="orName" value="<? echo $orName ?>" size="40" maxlength="100"> </td> </tr> <tr> <td><div align="right">Delivery Address: *: </div></td> <td><input name="orDelAddress1" type="text" id="orDelAddress1" value="<? if($orDelAddress1) echo $orDelAddress1; else echo $orDelAddress1; ?>" size="50" maxlength="50"></td> </tr> <tr> <td> </td> <td><input name="orDelAddress2" type="text" id="orDelAddress2" value="<? if($orDelAddress2) echo $orDelAddress2; else echo $orDelAddress2; ?>" size="50" maxlength="50"></td> </tr> <tr> <td><div align="right"> </div></td> <td><input name="orDelAddress3" type="text" id="orDelAddress3" value="<? if($orDelAddress3) echo $orDelAddress3; else echo $orDelAddress3; ?>" size="50" maxlength="50"></td> </tr> <tr> <td><div align="right">Town:</div></td> <td><input name="orDelTown" type="text" id="orDelTown" value="<? if($orDelTown) echo $orDelTown; else echo $orDelTown; ?>" size="50" maxlength="50"></td> </tr> <tr> <td><div align="right">Post Code<? if($orDelCountry == "UK") echo "*" ?>: </div></td> <td><input name="orDelPostcode" type="text" id="orDelPostcode" value="<? if($orDelPostcode) echo $orDelPostcode; else echo $orDelPostcode; ?>" size="10" maxlength="10"></td> </tr> <tr> <td><div align="right">County:</div></td> <td><input name="orDelCounty" type="text" id="orDelCounty" value="<? echo $orDelCounty ?>" size="40" maxlength="100"> </td> </tr> <tr> <td><div align="right">Email*:</div></td> <td><input name="orEmail" type="text" id="orEmail" value="<? echo $orEmail ?>" size="40" maxlength="100"></td> </tr> <tr id="trColumnTitles" > <td colspan="2" style="background-color:#CCC"> <strong>Billing Address:</strong></td> </tr> <tr> <td><div align="right"> Credit Card Billing Address: *: </div></td> <td><input name="ccAddress1" type="text" id="ccAddress1" value="<? if($ccAddress1) echo $ccAddress1; else echo $orDelAddress1; ?>" size="50" maxlength="50"></td> </tr> <tr> <td><div align="right">[<a href="Javascript:goCopy();">click here to copy from delivery address </a>] </div></td> <td><input name="ccAddress2" type="text" id="ccAddress2" value="<? if($ccAddress2) echo $ccAddress2; else echo $orDelAddress2; ?>" size="50" maxlength="50"></td> </tr> <tr> <td><div align="right"> </div></td> <td><input name="ccAddress3" type="text" id="ccAddress3" value="<? if($ccAddress3) echo $ccAddress3; else echo $orDelAddress3; ?>" size="50" maxlength="50"></td> </tr> <tr> <td><div align="right">Town:</div></td> <td><input name="ccTown" type="text" id="ccTown" value="<? if($ccTown) echo $ccTown; else echo $orDelTown; ?>" size="50" maxlength="50"></td> </tr> <tr> <td><div align="right">Post Code<? if($orDelCountry == "UK") echo "*" ?>: </div></td> <td><input name="ccPostcode" type="text" id="ccPostcode" value="<? if($ccPostcode) echo $ccPostcode; else echo $orDelPostcode; ?>" size="10" maxlength="10"></td> </tr> <tr> <td><div align="right">Telephone No *: </div></td> <td><input name="orTel" type="text" id="orTel" value="<?= $orTel; ?>" size="14" maxlength="20"></td> </tr> <tr id="trColumnTitles" > <td colspan="2" style="background-color:#CCC"> <strong>Card details:</strong></td> </tr> <tr> <td><div align="right">Payment amount: £</div></td> <td><input name="orTotal" type="text" id="orTotal" value="<? echo number_format($orTotal,2, ".", ""); ?>" size="20" maxlength="20" readonly=""></td> </tr> <tr> <td><div align="right">Card holder's name as it appears on your card*:</div></td> <td><input name="cardHolder" type="text" id="cardHolder" value="<? if($cardHolder) echo $cardHolder; else echo $orName ?>" size="50" maxlength="50"></td> </tr> <tr> <td><div align="right">Card Type*:</div></td> <td> <select name="cardType" id="cardType"> <option value="VISA" <? if($cardType=="VISA") echo "selected"; ?>>Visa</option> <option value="DELTA" <? if($cardType=="DELTA") echo "selected"; ?>>Visa Delta/Debit </option> <option value="MC" <? if($cardType=="MC") echo "selected"; ?>>Mastercard</option> <option value="SWITCH" <? if($cardType=="SWITCH") echo "selected"; ?>>Maestro</option> <option value="SOLO" <? if($cardType=="SOLO") echo "selected"; ?>>SOLO</option> <option value="UKE" <? if($cardType=="UKE") echo "selected"; ?>>Visa Electron</option> </select> </td> </tr> <tr> <td><div align="right">Card Number*:</div></td> <td><input name="cardNumber" type="text" id="cardNumber" value="<? echo $cardNumber ?>" size="20" maxlength="20"> (no spaces please)</td> </tr> <tr> <td><div align="right">Start Date:</div></td> <td><input name="startDate" type="text" id="startDate" value="<? echo $startDate ?>" size="4" maxlength="4"> (MMYY) Switch and Solo cards only </td> </tr> <tr> <td><div align="right">Expiry Date*:</div></td> <td><input name="expiryDate" type="text" id="expiryDate" value="<? echo $expiryDate ?>" size="4" maxlength="4"> (MMYY)</td> </tr> <tr> <td><div align="right">Issue Number:</div></td> <td><input name="issueNumber" type="text" id="issueNumber" value="<? echo $issueNumber ?>" size="2" maxlength="2"> Exactly as it appears on the card</td> </tr> <tr> <td><div align="right">CV2*: </div></td> <td><input name="CV2" type="text" id="CV2" value="<? echo $CV2 ?>" size="4" maxlength="4"> Last three digits on signature strip</td> </tr> <? if(!$xcnId) {?> <tr id="trColumnTitles" > <td colspan="2" style="background-color:#CCC"> <strong>Confirm order:</strong></td> </tr> <tr> <td colspan="2"> If you would like us to save your details for future orders create a username and password below: </td> </tr> <tr> <td colspan="2"><div style="float:left; width:10%">Username: </div><div style="float:left;"> <input name="cnUsername" type="text" id="cnUsername" value="<? echo $cnUsername ?>" size="40" maxlength="100"></div></td> </tr> <tr> <td colspan="2"><div style="float:left; width:10%">Password: </div><div style="float:left"> <input name="cnPassword" type="password" id="cnPassword" value="<? echo $cnPassword ?>" size="40" maxlength="100"></div></td> </tr> <? } ?> <tr > <td colspan="2"><input name="sbmt" type="hidden" id="sbmt" value="1"> <input type="submit" name="Submit" value="Make payment"> <? echo back($back); ?> <input name="paypalOK" type="hidden" id="paypalOK" value="0"></td> </tr> </table> <input type="hidden" name="basketURL" value="<?= double_implode(":","|",$basketArray); ?>" /> <input type="hidden" name="xcnId" value="<?= $xcnId ?>" /> <input type="hidden" name="orId" value="<?= $orId ?>" /> <input type="hidden" name="prSize" value="<?= $prSize?>" /> </form> </div> </div> <div style="position:absolute;"> <div style="position:relative;z-index:2;margin-top:5px;margin-left:35px" > <a style="text-decoration:none;background:none" href="http://www.egowear.co.uk/designer.php"><img src="images/spacer.gif" border="0" width="200" height="205" /></a> </div> </div> <img src="images/bot1.jpg" /> </div> </div> </div> </body> </html> <? } ?> from the customer so that I can record the transaction into my database seeing as the pay button is on paypal and not on my any of my site. hey guys. I am using Liberty reserve to sell my digital items online, when the user buys the item LR posts back item_id so I can grab the id out of the database to display to the buyer and lr_amnt to check the amount against the one inside the database before displaying the result to the user. TOP: <?php include 'includes/config.inc.php'; if(isset($_POST['item_id']) && isset($_POST['lr_amnt'])) { $itemID = $_POST['item_id']; $lrAmt = $_POST['lr_amnt']; $result = mysql_query("SELECT * FROM items WHERE item_id='$itemID'"); while($row = mysql_fetch_array($result)) { $login = $row['item_login']; $pass = $row['item_pass']; $itemName = $row['item_account']; $itemDel = $row['item_del']; $price = $row['item_price']; } } ?> -------------------------------- Header: <?php if($lrAmt != $price) : ?> <h2>Fatal error in transaction: the price does not match that in the database</h2> <?php else: ?> <h2>Thank you for you're purchase of <?php echo $itemName; ?>. Please keep these details safe as they have been deleted from our database.</h2> <?php echo '<br />'; echo 'Your new Username: ' . $login; echo '<br />'; echo 'Your password: ' . $pass; ?> <?php endif; ?> but if the user views the source code and grabs the ID they could easily get it for free by making a simple html script that takes in item_id and lr_amnt and put in the values and post it to the success page. example: Code: [Select] <fieldset> <!-- <legend>Forgot password</legend> --> <form method="post" action="http://angrypossum.org/carl/mySaleTwo/success.php"> <p> <label for="itemid">Item ID: </label> <input type="text" name="item_id" id="itemid" class="input" /> </p> <p> <label for="itemprice">Item price: </label> <input type="text" name="lr_amnt" id="itemprice" class="input" /> </p> <p> <input type="submit" name="login" value="Steal" class="button" /> </p> </form> </fieldset> how could I stop that? thanks I need to store the Login ID and Key for my Payment Gateway, and figured it was best to do this outside my web root ("httpdocs") on my VPS. Unfortunately, my PHP Include is breaking, and it looks like this is a *major* thing to get working, since requires me to tinker with Plesk's default settings in Linux. (This link seems to discuss the same issues I'm having: http://stackoverflow.com/questions/2370053/how-to-include-file-outside-document-root ) Anyways... Since I'm no Linux guru and afraid of breaking my VPS, how bad would it be to store my Authorize.net API ID and Key in a PHP file in my web root and include that file in my "checkout.php" file?? If anyone knows a reasonably easy way to fix the issue described in the link above, I'm all for it, but I am thinking I may have to just settle on leaving things in my web root... Thanks, Debbie We are trying to capture customer details & redirecting the customer to payment gateway page and, after succesful transaction from payment gateway we are facing a problem for different browsers. Ideally after successful transaction the page should redirect to order confirmation page but it is redirecting to our cart page.In IE7 it is working fine but in mozilla firefox it is redireting to cart page.On analyzing we found that session is not persisting in firefox. Please help we have stuck here Suggest something if you have faced similar issue with different browsers. This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=276607.0 I have a form, details getting from customer and calculate the grand total, here how can i pass my grand total value to ccavenue payment gateway page and getting payment form customer? code : https://www.pastiebin.com/5cdbae859bb64 Can someoneplease help, I need to setup an error page like IF Username and Password are wrong then show an error also if there is no username or password in the fields and I just click LOGIN, I get a blank page?! Can someone please help me here or point me to a relevant tutorial? thanks here is my page: http://www.retroandvintage.co.uk/default.php here is my code: Code: [Select] <?php session_start(); include_once("config.php"); $ebits = ini_get('error_reporting'); error_reporting($ebits ^ E_NOTICE); /* Login script: This script does the following: Checks that the user is NOT already logged in - if they are they are redirected to the members page by the 'checkLoggedIn()' function. Checks if the login form has been submitted - if so, the 'login' and 'password' fields are checked to ensure they are of the correct format and length. If there are any problems here an error is added to the $messages array and then the script executes the 'doIndex()' function - this function basically outputs the main 'index' page for this script - ie the login form. If there are no problems with the previous step, the 'login' and 'password' field data is passed to the 'checkPass' function to check that an entry exists in the 'users' table for that login/password pair. If nothing is returned from the 'checkPass()' function, an error is added to the $messages array and the 'doIndex()' function is called as above. If a row of data is returned from the 'users' table, the data is passed to the 'cleanMemberSession()' function - which initializes session variables and logs the user in. The user is then forwarded to the members page. If the form hasn't yet been submitted, then the 'doIndex()' function is called and the login page is displayed. */ // Check user not logged in already: checkLoggedIn("no"); // Page title: $title="Member Login Page"; // if $submit variable set, login info submitted: if(isset($_POST["submit"])) { // // Check fields were filled in // // login must be between 4 and 15 chars containing alphanumeric chars only: field_validator("rsUser", $_POST["rsUser"], "alphanumeric", 4, 15); // password must be between 4 and 15 chars - any characters can be used: field_validator("rsPass", $_POST["rsPass"], "string", 4, 15); // if there are $messages, errors were found in validating form data // show the index page (where the messages will be displayed): if($messages){ doIndex(); // note we have to explicity 'exit' from the script, otherwise // the lines below will be processed: exit; } // OK if we got this far the form field data was of the right format; // now check the user/pass pair match those stored in the db: /* If checkPass() is successful (ie the login and password are ok), then $row contains an array of data containing the login name and password of the user. If checkPass() is unsuccessful however, $row will simply contain the value 'false' - and so in that case an error message is stored in the $messages array which will be displayed to the user. */ if( !($row = checkPass($_POST["rsUser"], $_POST["rsPass"])) ) { // login/passwd string not correct, create an error message: $messages[]="Incorrect login/password, try again"; } /* If there are error $messages, errors were found in validating form data above. Call the 'doIndex()' function (which displays the login form) and exit. */ if($messages){ doIndex(); exit; } /* If we got to this point, there were no errors - start a session using the info returned from the db: */ cleanMemberSession($row["rsUser"], $row["rsPass"]); // and finally forward user to members page (populating the session id in the URL): header("Location: main.php"); } else { // The login form wasn't filled out yet, display the login form for the user to fill in: doIndex(); } /* This function displays the default 'index' page for this script. This consists of just a simple login form for the user to submit their username and password. */ function doIndex() { /* Import the global $messages array. If any errors were detected above, they will be stored in the $messages array: */ global $messages; /* also import the $title for the page - note you can normally just declare all globals on one line - ie: global $messages, $title; */ global $title; } // drop out of PHP mode to display the plain HTML: ?> <!doctype html> <html> <head> <title>List of Pubs and Bars in the UK</title> <meta name="description" content="Pubs and bars in the UK, nightlife for food and drink" /> <meta name="keywords" content="Pubs, bars, List, uk, nightlife, drinking, drinks, beer, lager, food" /> <meta name="Content-Language" content="en-gb" /> <meta name="robots" content="FOLLOW,INDEX" /> <meta name="revisit-after" content="2 days" /> <meta name="copyright" content="jbiddulph.com" /> <meta name="author" content="John Biddulph - Professional web site design and development in the south of england mainly worthing and brighton" /> <meta name="distribution" content="Global" /> <meta name="resource-type" content="document" /> <link rel="stylesheet" type="text/css" href="css/reset.css" /> <link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.8.6.custom.css" title="default" /> <link rel="alternate stylesheet" type="text/css" href="css/south-street/jquery-ui-1.8.6.custom.css" title="1" /> <link rel="alternate stylesheet" type="text/css" href="css/redmond/jquery-ui-1.8.6.custom.css" title="2" /> <script type="text/javascript" src="js/stylechanger.js"></script> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.6.custom.min.js"></script> <script type="text/javascript"> $(function(){ // Accordion $("#accordion").accordion({ header: "h3" }); // Tabs $('#tabs').tabs(); // Dialog $('#dialog').dialog({ autoOpen: false, width: 600, buttons: { "Ok": function() { $(this).dialog("close"); }, "Cancel": function() { $(this).dialog("close"); } } }); // Dialog Link $('#dialog_link').click(function(){ $('#dialog').dialog('open'); return false; }); // Datepicker $('#datepicker').datepicker({ inline: true }); //hover states on the static widgets $('#dialog_link, ul#icons li').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); }); </script> <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else { $.post("rpc.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString').val(thisValue); setTimeout("$('#suggestions').hide();", 200); } </script> </head> <body> <?php if($messages) { displayErrors($messages); }?> <header> <div id="title"> <h1>My Pub Space <a href="#" onClick="setActiveStyleSheet('default'); return false;"><img src="images/0.gif" width="15" height="15" border="0" alt="css style" /></a> <a href="#" onClick="setActiveStyleSheet('1'); return false;"><img src="images/1.gif" width="15" height="15" border="0" alt="css style" /></a> <a href="#" onClick="setActiveStyleSheet('2'); return false;"><img src="images/2.gif" width="15" height="15" border="0" alt="css style" /></a> <span> <form method="post" class="textbox" action="search.php"> Town/City: <input type="text" size="26" class="searchbox" value="" name="rsTown" id="inputString" onKeyUp="lookup(this.value);" onBlur="fill();" /> <div class="suggestionsBox" id="suggestions" style="display: none;"> <img src="images/upArrow.png" style="position: relative; top: -36px; left: 105px; z-index:1;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList"> </div> </div> <input type="image" src="images/go.png" height="30" with="30" value="GO" /> </form> </span> </h1> </div> </header> <nav> <ul> <li class="selected"><a href="default.php">Home</a></li> <li><a href="#">Pubs</a></li> <li><a href="#">Members</a></li> <li><a href="#">Events</a></li> <li><a href="register.php">Register</a></li> </ul> </nav> <section id="intro"> <header> <h2>Your social guide to going down the pub, online!</h2> </header> <p>Stuck in town with nowhere to go? Not sure if up the road or down the street is best? Need to be somewhere warm, cosy and friendly. Need a drink?....<br />You've come to the right place, mypubspace has it all!</p> <img src="images/pub.jpg" alt="pub" /> </section> <div id="content"> <div id="mainContent"> <section> <article class="blogPost"> <header> <h2>Pubs and Bars UK Listing</h2> </header> <?php $tableName="pubs"; $targetpage = "default.php"; $limit = 20; $query = "SELECT COUNT(*) as num FROM $tableName"; $total_pages = mysql_fetch_array(mysql_query($query)); $total_pages = $total_pages['num']; $stages = 3; $page = mysql_escape_string($_REQUEST['page']); if( isset($_REQUEST['page']) && ctype_digit($_REQUEST['page']) ) { $page = (int) $_GET['page']; $start = ($page - 1) * $limit; }else{ $start = 0; } // Get page data $query1 = "SELECT * FROM $tableName LIMIT $start, $limit"; $result = mysql_query($query1); // Initial page num setup if ($page == 0){$page = 1;} $prev = $page - 1; $next = $page + 1; $lastpage = ceil($total_pages/$limit); $LastPagem1 = $lastpage - 1; $paginate = ''; if($lastpage > 1) { $paginate .= "<div class='paginate'>"; // Previous if ($page > 1){ $paginate.= "<a href='$targetpage?page=$prev'>previous</a>"; }else{ $paginate.= "<span class='disabled'>previous</span>"; } // Pages if ($lastpage < 7 + ($stages * 2)) // Not enough pages to breaking it up { for ($counter = 1; $counter <= $lastpage; $counter++) { if ($counter == $page){ $paginate.= "<span class='current'>$counter</span>"; }else{ $paginate.= "<a href='$targetpage?page=$counter'>$counter</a>";} } } elseif($lastpage > 5 + ($stages * 2)) // Enough pages to hide a few? { // Beginning only hide later pages if($page < 1 + ($stages * 2)) { for ($counter = 1; $counter < 4 + ($stages * 2); $counter++) { if ($counter == $page){ $paginate.= "<span class='current'>$counter</span>"; }else{ $paginate.= "<a href='$targetpage?page=$counter'>$counter</a>";} } $paginate.= "..."; $paginate.= "<a href='$targetpage?page=$LastPagem1'>$LastPagem1</a>"; $paginate.= "<a href='$targetpage?page=$lastpage'>$lastpage</a>"; } // Middle hide some front and some back elseif($lastpage - ($stages * 2) > $page && $page > ($stages * 2)) { $paginate.= "<a href='$targetpage?page=1'>1</a>"; $paginate.= "<a href='$targetpage?page=2'>2</a>"; $paginate.= "..."; for ($counter = $page - $stages; $counter <= $page + $stages; $counter++) { if ($counter == $page){ $paginate.= "<span class='current'>$counter</span>"; }else{ $paginate.= "<a href='$targetpage?page=$counter'>$counter</a>";} } $paginate.= "..."; $paginate.= "<a href='$targetpage?page=$LastPagem1'>$LastPagem1</a>"; $paginate.= "<a href='$targetpage?page=$lastpage'>$lastpage</a>"; } // End only hide early pages else { $paginate.= "<a href='$targetpage?page=1'>1</a>"; $paginate.= "<a href='$targetpage?page=2'>2</a>"; $paginate.= "..."; for ($counter = $lastpage - (2 + ($stages * 2)); $counter <= $lastpage; $counter++) { if ($counter == $page){ $paginate.= "<span class='current'>$counter</span>"; }else{ $paginate.= "<a href='$targetpage?page=$counter'>$counter</a>";} } } } // Next if ($page < $counter - 1){ $paginate.= "<a href='$targetpage?page=$next'>next</a>"; }else{ $paginate.= "<span class='disabled'>next</span>"; } $paginate.= "</div>"; } echo $total_pages.' Results'; // pagination echo $paginate; ?> <div id="accordion"> <?php while($row = mysql_fetch_array($result)) { echo '<div><h3><a href=\"#\">'.$row['rsPubName'].'</a></h3><div>'.$row['rsAddress'].'<br />'.$row['rsTown'].', '.$row['rsCounty'].'<br />'.$row['rsPostCode'].'<br /><br />Region: '.$row['Region'].'<br /><br />Telephone: '.$row['rsTel'].'</div></div>'; } ?> </div> </article> </section> </div> <aside> <section> <header> <h3>Members Login Area</h3> </header> <form method="post" class="textbox" action="<?php print $_SERVER["PHP_SELF"]; ?>"> Username: <br /> <input type="text" class="textbox" name="rsUser" value="<?php print isset($_POST["rsUser"]) ? $_POST["rsUser"] : "" ; ?>"> Password: <br /> <input type="password" class="textbox" name="rsPass"> <br /> <br /> <input name="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="submit" value="Login"> <br /> </form> <ul> <li><button id="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text"><a href="register.php">Sign up</a></span></button></li> <li><button id="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text"><a href="forgot.php">Forgot Password</a></span></button></li> </ul> </section> <section> <header> <h3>Quick Search</h3> </header> <ul> <li><a href="#">Coming Soon!</a></li> </ul> </section> </aside> </div> <footer> <div> <section id="about"> <header> <h3>About</h3> </header> <p>My Pub Space is one of the largest and newest UK Pubs and Bars Listing sites online. It is not just a list of pubs, we have added a touch of interactive social pubbing experience online! Once registered, you can view information on pubs in your area, write reviews, organise your evenings out!</p> </section> <section id="blogroll"> <header> <h3>Links</h3> </header> <ul> <li><a href="#">Coming Soon!</a></li> </ul> </section> <section id="popular"> <header> <h3>Popular</h3> </header> <ul> <li><a href="#">Coming Soon!</a></li> </ul> </section> </div> </footer> </body> </html>
Hello. I activate the Payment Gateway Platform (by Redsys in Spain), and it works fine asking you for card number and it goes through correctly and says PAYMENT OK, but the notification.PHP FILE does not work. Could my server (SSL) configuration be the problem? or is it the CODE? Any help about this, please, would be highly appreciated. Thank you. Part of the Nofication.php code is: __________________________________________________________________________________
<?php $handle = fopen("_redsys.log", "a");
require_once("include/dbcommon.php"); $miObj = new RedsysAPI;
$version = postvalue("Ds_SignatureVersion");
// $version = "HMAC_SHA256_V1";
$claveModuloAdmin = 'sq7HjrUOBfKmC576ILgskD5srU870gJ7';
if ($signatureCalculada === $signatureRecibida && $res["Ds_AuthorisationCode"]!="++++++" && !isset($res["Ds_ErrorCode"]) {
$sql = "SELECT Espacio FROM Espacios WHERE Id_Espacio=" . $values["Id_Espacio"];
// echo '<img src="data:image/jpeg;base64,'.$imageData.'">';
_______________________________________________________________________________________________ Hi Guys, I'm trying the following.. returning an array from a php function to Ajax success but the alert seems to only display undefined. PHP Code: [Select] public function reply() { $item_id = $this->uri->segment(3); $type = $this->uri->segment(4); if($type == 1){ $data['get_news_item'] = $this->Newsletter_model->get_news_item($item_id); $test = array( "Paul", "Mike"); return $test; } } AJAX Code: [Select] $.ajax({ type: "POST", url: "<?php echo site_url(); ?>newsletter/reply/"+id+"/"+type, cache: false, success: function (data){ alert(data[0]); // So this should display "Paul"? }); [/code] Can anyone provide a snip of code that I could insert into the "coupon code" field on a formmail form which has the following effect: on submit form, user goes to the normal payment page (this is already implemented) if coupon code field is filled out with correct code, user is taken to alternate payment page on form submit. Either this or another approach which has the same result is OK. I am a novice coder working in a wysiwyg - I don't REALLY know php at all - I just need a snip I can insert and a clear instruction. Thanks so much for any help. Why am I getting a blank page with no errors with the following code? Code: [Select] <?php session_start(); if (isset($_SESSION['cart'])){ foreach ($_SESSION['cart'] as $key => $value){ echo "Product Number $key Quantity $value<br />"; } } require_once("functions.php"); //DatabaseConnection(); ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ordering doggy treats</title> <link href="doggyTreats.css" rel="stylesheet" type="text/css" /> <style type="text/css"> #order { margin-right: auto; margin-left: auto; } .orderRow{ padding-bottom: 50px; } h2 { text-align: center; } </style> </head> <body> <?php $errors=array(); if(isset($_POST['submit'])){ validate_input(); if(count($errors) !=0) { display_form(); } else { display_form(); } function validate_input() { global $errors; if($_POST["fname"] == " ") { $errors['fname']="<span style=\"color:red;\"> Please enter your first name </span>"; } } } //logo(); navBar(); function display_form() { global $errors; extract($_POST); if(!isset($submit)) { ?> <table id="order"> <form action="checkOut.php" method="post" name="checkOut"> <caption><h2>Customer Information </h2> </caption> <tr class = "orderRow"> <td> First Name:<br /> <input name="fname" type="text" size="10" maxlength="20" value="<?php echo $_POST[fname];?>"/> </td> <td> Last Name: <br /> <input name="lname" type="text" size="10" maxlength="20" /> </td> <td> Address: <br /> <input name="address " type="text" size="25" /> </td> </tr> <tr class = "orderRow"> <td> City: <br /> <input name="city " type="text" size="15" maxlength="20" /> </td> <td> State: <br /> <select name = "state"> <option selected value ="Please choose a state"/> Please choose a state</option> <option value = "AL" />AL</option> <option value = "AK" />AK</option> <option value = "AR" />AR</option> <option value = "AZ" />AZ <option value = "CA" />CA <option value = "CO" />CO <option value = "CT" />CT <option value = "DE" />DE <option value = "DC" />DC <option value = "FL" />FL <option value = "GA" />GA <option value = "HI" />HI <option value = "IA" />IA <option value = "ID" />ID <option value = "IL" />IL <option value = "IN" />IN <option value = "KS" />KS <option value = "KY" />KY <option value = "LA" />LA <option value = "MA" />MA <option value = "ME" />ME <option value = "MD" />MD <option value = "MI" />MI <option value = "MN" />MN <option value = "MO" />MO <option value = "MS" />MS <option value = "MT" />MT <option value = "NC" />NC <option value = "ND" />ND <option value = "NE" />NE <option value = "NH" />NH <option value = "NJ" />NJ <option value = "NM" />NM <option value = "OH" />OH <option value = "OK" />OK <option value = "OR" />OR <option value = "PA" />PA <option value = "RI" />RI <option value = "SC" />SC <option value = "SD" />SD <option value = "TN" />TN <option value = "TX" />TX <option value = "UT" />UT <option value = "VA" />VA <option value = "VT" />VT <option value = "WA" />WA <option value = "WI" />WI <option value = "WV" />WV <option value = "WY" />WY </select> </td> <td> Zip Code:<br /> <input name="zipcode" type="text" size="5" maxlength="5" /> </td> </tr> <tr class = "orderRow"> <td> Phone <br /> Please include area code <br /> <input name="phone" type="text" size="13" maxlength="13" /> </td> <td> Fax:<br /> <input name="" type="text" size="13" maxlength="13" /> </td> <td> Email: <br /> <input name="email " type="text" size="15" maxlength="30" /> </td> </tr> <tr class = "orderRow"> <td> Please choose method of payment: <br /> Check <input name="check " type="radio" value="Check " /> Money Order <input name="money " type="radio" value="Money order " /><br />PayPal<input name="paypal" type="radio" value="Paypal" /> </td> </tr> <tr> <td colspan = "6"> <h2> Pet Information </h2></td> </tr> <tr> <td> Name: <br /> <input name="petName" type="text" size="10" maxlength="20" /> </td> <td> Age: <br /> <select name="age"> HEREDOC; for ($age =1; $age <=20; $age ++) { print "<option value=\"age\"> $age</option>"; } echo <<<HEREDOC </select> </td> <td> Breed:<br /> <select name = "breed"> <option selected value ="Please choose a breed"/> Please choose a breed <option value = "I don't know" />I don't know <option value = "Affernpincher" />Affernpincher <option value = "Afghan Hound" />Afghan Hound <option value = "Airedale Terrier" /> Airedale Terrior <option value = "Akita" /> Akita <option value = "Alaskan Malamute" /> Alaskan Malamute <option value = "Standard American Eskimo Dog"/> Standard American Eskimo Dog <option value = "Miniature American Eskimo Dog"/>Miniature American Eskimo Dog <option value = "Toy American Eskimo Dog"/> Toy American Eskimo Dog <option value = "American Foxhound" /> American Foxhound <option value = "American Staffordshire Terrier" /> American Staffordshhire Terrier <option value = "American Water Spaniel" /> American Water Spaniel <option value = "Australian Shepherd Dog"/> Anatolian Shepherd Dog <option value = "Australian Cattle Dog"/> Australian Cattle Dog <option value = "Australian Shepherd"/> Australian Shepherd <option value = "Australian Terrier" /> Australia Terrier <option value = "Basenji" /> Basenji <option value = "Basset Hound" /> Basset Hound <option value = "Beagle" /> Beagle <option value = "Bearded Collie" /> Bearded Collie <option value = "Beauceron" /> Beauceron <option value = "Bedington Terrier"/> Bedington Terrier <option value = "Belgin Malinois"/> Belgin Malinois <option value = "Belgian Sheepdog"/> Belgian Sheepdog <option value = "Belgian Tervuren"/> Belgian Tervuren <option value = "Bernese Mountain Dog"/> Bernese Mountain Dog <option value = "Bichon Frise"/> Bichon Frise <option value = "Black and Tan Greyhound" /> Black and Tan Greyhound <option value = "Black Russian Terrier" /> Black Russian Terrier <option value = "Bloodhoung" /> Bloodhound <option value = "Border Collie" /> Border Collie <option value = "Border Terrier"/> Border Terrier <option value = "Borzoi"/> Borzoi <option value = "Boston Terrier"/> Boston Terrier <option value = "Bouvier des Flandres"/> Bouvier des Flandres <option value = "Boxer"/> Boxer <option value = "Briard"/> Briard <option value = "Brittany" /> Brittany <option value = "Brussels Griffon" /> Brussels Griffon <option value = "Bulldog" /> Bulldog <option value = "Bullmastiff" /> Bullmasttiff <option value = "Bull Terrier" /> Bull Terrier <option value = "Cairn Terrier" /> Cairn Terrier <option value = "Canaan Dog" /> Canaan Dog <option value = "Cardigan Welsh Corgi" /> Cardigan Welsh Corgi <option value = "Cavalier King Charles Spaniel" />Cavalier King Charles Spaniel <option value = "Chesepeake Bay Retriever" />Chesapeake Bay Retriever <option value = "Chilauhua" /> Chilauhua <option value = "Chinese Created" /> Chinese Crested <option value = "Chinese Shar-Pei" /> Chinese Shar-Pei <option value = "Chow Chow" /> Chow Chow <option value = "Clumber Spaniel" /> Clumber Spaniel <option value = "Cocker Spaniel" /> Cocker Spaniel <option value = "Collie" /> Collie <option value = "Curly-Coated Retrieve" /> Curly-Coated Retriever <option value = "Dachshound" /> Dachshund <option value = "Dalmation" /> Dalmation <option value = "Dandle Dimonnt" /> Dandie Dinmont Terrier <option value = "Doberman Pincher" /> Doberman Pincher <option value = "Dogue de Bordeaux" /> Dogue de Bordeaux <option value = "English Cocker Spaniel" /> English Cocker Spaniel <option value = "English Foxhound" /> English Foxhound <option value = "English Setter" /> English Setter <option value = "English Springer" /> English Springer <option value = "English Toy Spaniel" /> English Toy Spaniel <option value = "Field Spaniel" /> Field Spaniel <option value = "Finnish Spitz" /> Finnish Spitz <option value = "Flat-Coated Retriever" /> Flat-Coated Retriever <option value = "French Bulldog" /> French Bulldog <option value = "German Shepherd Dog" /> German Shepherd Dog <option value = "German Shorthaired Pointer"/>German Shorthaired Pointer <option value = "German Wirehaired Pointer" /> German Wirehaired Pointer <option value = "Giant Schnauzer" /> Giant Schnauzer <option value = "Glen of Imaal Terrier" /> Glen of Imaal Terrier <option value = "Golden Retriever" /> Golden Retriever <option value = "Gorden Setter" /> Gorden Setter <option value = "Great Dane" /> Great Dane <option value = "Greater Swiss Mountain Dog" /> Greater Swiss Mountain Dog <option value = "Great Pyrenees" /> Great Pyrenees <option value = "Greyhound" /> Greyhound <option value = "Harrier" /> Harrier <option value = "Havanese" /> Havanese <option value = "Ibizen Hound" /> Ibizen Hound <option value = "Irish Setter" /> Irish Setter <option value = "Irish Terrier" /> Irish Terrier <option value = "Irish Water Spaniel" /> Irish Water Spaniel <option value = "Irish Wolfhound" /> Irish Wolfhound <option value = "Italian Greyhound" /> Italian Greyhound <option value = "Jack Russell Terrier" /> Jack Russell Terrier <option value = "Japanese Chin" /> Japanese Chin <option value = "Keeshound" /> Keeshound <option value = "Kerry Blue TErrier" /> Kerry Blue Terrier <option value = "Komondor" /> Komondor <option value = "Kuvasz" /> Kuvasz <option value = "Labradar Retriever" /> Labrador Retriever <option value = "Lakeland Terrier" /> Lakeland Terrier <option value = "Lhasa Apso" /> Lhasa Apso <option value = "Lowchen" /> Lowchen <option value = "Maltese" /> Maltese <option value = "Standard Manchester Terrier" /> Standard Manchester Terrier <option value = "Mastiff" /> Mastiff <option value = "Miniature Bull Terrier" /> Miniature Bull Terrier <option value = "Miniature Pinche" /> Miniature Pinscher <option value = "Miniature Poodle" /> Miniature Poodle <option value = "Miniature Schnauzer" />Miniature Schnauzer <option value = "Mutt" />Mutt <option value = "Neopolitan Mastiff" />Neopolitan Mastiff <option value = "Newfoundland " /> Newfoundland <option value = "Newfolk Terrier" />Norfolk Terrier <option value = "Norwegian Elkhound" /> Norwegian Elkhound <option value = "Norwich Terrier" /> Norwich Terrier <option value = "Nova Scotia Duck Tolling Retriever" /> Nova Scotia Duck Tolling Retriever <option value = "Old English Sheepdog" />Old English Sheepdog <option value = "Otterhound" /> Otterhound <option value = "Papillon" />Papillon <option value = "Parson Russell Terrier" /> Parson Russell Terrier <option value = "Pekingese" />Pekingese <option value = "Pembroke Welsh Corgi" />Pembroke Welsh Corgi <option value = "Petit Basset Griffon Vendeen" />Petit Basset Griffon Vendeen <option value = "Pharch Hound" />Pharoh Hound <option value = "Plott" /> Plott <option value = "Pointer" /> Pointer <option value = "Polish Lowland Sheepdog" />Polish Lowland sheepdog <option value = "Pomeranian" /> Pomeranian <option value = "Portuguese Water Dog" />Portuguese Water Dog <option value = "Pug" />Pug <option value = "Pull" />Puli <option value = "Rhodesian Ridgeback" />Rhodesian Ridgeback <option value = "Rottweiler" />Rottweiler <option value = "ASaint Bernard" /> Saint Bernard <option value = "Saluki" /> Saluki <option value = "Samoyed" />Samoyed <option value = "Schipperke" />Schipperke <option value = "Scottish Doverhound" />Scottish Deerhound <option value = "Scottish Terrier" />Scottish Terrier <option value = "Sealyham Terrier" />Sealyham Terrier <option value = "Shetland Sheepdog" />Shetland Sheepdog <option value = "Shiba Inu" />Shiba Inu <option value = "Shih Tzu" />Shih Tzu <option value = "Siberian Husky" />Siberian Husky <option value = "Silky Terrier" />Silky Terrier <option value = "Skye Terrier" />Skye Terrier <option value = "Smooth Fox Terrier" />Smooth Fox Terrier <option value = "Soft Coated Wheaten Terrier" />Soft Coated wheaten Terrier <option value = "Spinone Italiano" />Spinone Italiano <option value = "Staffordshire Bull Terrier" />Staffordshire Bull Terrier <option value = "Standard Poodle" />Standard Poodle <option value = "Standard Schnauer" /> Standard Schnauzer <option value = "Suseex Spaniel" />Sussex Spaniel <option value = "Swedish Vallhound" />Swedish Vallhund <option value = "Tibertan Mastiff" />Tibetan Mastiff <option value = "Tibertan Spaniel" />Tibetan Spaniel <option value = "Tibetan Terrier" />Tibetan Terrier <option value = "Toy Fox Terrier" />Toy Fox Terrier <option value = "Toy Manchester Terrier" />Toy Manchester Terrier <option value = "Toy Poodle" />Toy Poodle <option value = "Vizela" />Vizela <option value = "Weimaraner" />Weimaraner <option value = "Welsh Springer Spaniel" />Welsh Springer Spaniel <option value = "Welsh Terrier" />Welsh Terrier <option value = "West Highland White Terrier" />West Highland White Terrier <option value = "Whippet" />Whippet <option value = "Wire Fox Terrier" />Wire Fox Terrier <option value = "Wirehaired Pointing Griffon" />Wirehaired Pointing Griffon <option value = "Yorkshire Terrier" />Yorkshire Terrier </td> </select> </tr> <tr> <td>Nutritional Needs:</td> <td><textarea name="nutritionalNeeds" cols="17" rows="5"></textarea> </td> </tr> <tr> <td>Special Instructions</td> <td><textarea name="specialInstructions" cols="17" rows="5"></textarea> </tr> <tr> <td colspan = "6"><h2>Order Information</h2></td> </tr> <tr> HEREDOC; foreach($key as $value){ echo $value; } echo <<<HEREDOC </tr> <tr> <td> <input name="Submit" type="submit" value="Order Treats!" /></td><td><input name="reset" type="submit" value="Cancel Order" /> </td> </tr> </table> </form> HEREDOC; } } <?php footer(); ?> </body> </html> my page: http://www.retroandvintage.co.uk/register.php my code Code: [Select] <?php error_reporting(E_ALL) ; ini_set('display_errors', 1) ; session_start(); include_once("config.php"); require_once('captcha/recaptchalib.php'); $ebits = ini_get('error_reporting'); error_reporting($ebits ^ E_NOTICE); /* Login script: This script does the following: Checks that the user is NOT already logged in - if they are they are redirected to the members page by the 'checkLoggedIn()' function. Checks if the login form has been submitted - if so, the 'login' and 'password' fields are checked to ensure they are of the correct format and length. If there are any problems here an error is added to the $messages array and then the script executes the 'doIndex()' function - this function basically outputs the main 'index' page for this script - ie the login form. If there are no problems with the previous step, the 'login' and 'password' field data is passed to the 'checkPass' function to check that an entry exists in the 'users' table for that login/password pair. If nothing is returned from the 'checkPass()' function, an error is added to the $messages array and the 'doIndex()' function is called as above. If a row of data is returned from the 'users' table, the data is passed to the 'cleanMemberSession()' function - which initializes session variables and logs the user in. The user is then forwarded to the members page. If the form hasn't yet been submitted, then the 'doIndex()' function is called and the login page is displayed. */ // Check user not logged in already: checkLoggedIn("no"); // Page title: $title="Member Login Page"; // if $submit variable set, login info submitted: if(isset($_POST["login"])) { // // Check fields were filled in // // login must be between 4 and 15 chars containing alphanumeric chars only: field_validator("rsUser", $_POST["rsUser"], "alphanumeric", 4, 15); // password must be between 4 and 15 chars - any characters can be used: field_validator("rsPass", $_POST["rsPass"], "string", 4, 15); // if there are $messages, errors were found in validating form data // show the index page (where the messages will be displayed): if($messages){ doIndex(); // note we have to explicity 'exit' from the script, otherwise // the lines below will be processed: exit; } // OK if we got this far the form field data was of the right format; // now check the user/pass pair match those stored in the db: /* If checkPass() is successful (ie the login and password are ok), then $row contains an array of data containing the login name and password of the user. If checkPass() is unsuccessful however, $row will simply contain the value 'false' - and so in that case an error message is stored in the $messages array which will be displayed to the user. */ if( !($row = checkPass($_POST["rsUser"], $_POST["rsPass"])) ) { // login/passwd string not correct, create an error message: $messages[]="Incorrect login/password, try again"; } /* If there are error $messages, errors were found in validating form data above. Call the 'doIndex()' function (which displays the login form) and exit. */ if($messages){ doIndex(); exit; } /* If we got to this point, there were no errors - start a session using the info returned from the db: */ cleanMemberSession($row["rsUser"], $row["rsPass"]); // and finally forward user to members page (populating the session id in the URL): header("Location: main.php"); } else { // The login form wasn't filled out yet, display the login form for the user to fill in: doIndex(); } function doIndex() { /* Import the global $messages array. If any errors were detected above, they will be stored in the $messages array: */ global $messages; /* also import the $title for the page - note you can normally just declare all globals on one line - ie: global $messages, $title; */ global $title; } // if $submit variable set, login info submitted: if(isset($_POST["register"])) { $privatekey = "6Ldhhr4SAAAAAKFoL2INOZV0_VuF6_z3OwDjVFNn"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { // What happens when the CAPTCHA was entered incorrectly die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp->error . ")"); } else { // Your code here to handle a successful verification $rsPostCode = $_POST['rsPostCode']; $rsGender = $_POST['rsGender']; $rsUser = $_POST['rsUser']; $rsPass = $_POST['rsPass']; $rsEmail = $_POST['rsEmail']; $rsMobile = $_POST['rsMobile']; $rsAge = $_POST['rsAge']; $to = 'john.mbiddulph@gmail.com'; //define the subject of the email $subject = 'New user added to My Pub Space'; // message $message = ' <html> <head> <title>'.$subject.'</title> </head> <body> <table> <tr> <td>Name:</td> <td>'.$rsUser.'</td> </tr> <tr> <td>Email:</td> <td>'.$rsEmail.'</td> </tr> <tr> <td>Telephone:</td> <td>'.$rsMobile.'</td> </tr> <tr> <td>Age:</td> <td>'.$rsAge.'</td> </tr> <tr> <td>Password:</td> <td>'.$rsPass.'</td> </tr> </table> </body> </html> '; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To:' .$to. "\r\n"; $headers .= 'From:' .$rsEmail. "\r\n"; // Mail it mail($to, $subject, $message, $headers); $sql = "INSERT INTO members_copy (RSPOSTCODE, RSGENDER, RSUSER, RSPASS, RSEMAIL, RSMOBILE, RSAGE) VALUES ('$rsPostCode', '$rsGender', '$rsUser', '$rsPass', '$rsEmail', '$rsMobile', '$rsAge');"; //echo $sql; mysql_query($sql); // // Check fields were filled in // // login must be between 4 and 15 chars containing alphanumeric chars only: field_validator("rsUser", $_POST["rsUser"], "alphanumeric", 4, 15); // password must be between 4 and 15 chars - any characters can be used: field_validator("rsPass", $_POST["rsPass"], "string", 4, 15); // if there are $messages, errors were found in validating form data // show the index page (where the messages will be displayed): if($messages){ doIndex(); // note we have to explicity 'exit' from the script, otherwise // the lines below will be processed: exit; } // OK if we got this far the form field data was of the right format; // now check the user/pass pair match those stored in the db: /* If checkPass() is successful (ie the login and password are ok), then $row contains an array of data containing the login name and password of the user. If checkPass() is unsuccessful however, $row will simply contain the value 'false' - and so in that case an error message is stored in the $messages array which will be displayed to the user. */ if( !($row = checkPass($_POST["rsUser"], $_POST["rsPass"])) ) { // login/passwd string not correct, create an error message: $messages[]="Incorrect login/password, try again"; } /* If there are error $messages, errors were found in validating form data above. Call the 'doIndex()' function (which displays the login form) and exit. */ if($messages){ doIndex(); exit; } /* If we got to this point, there were no errors - start a session using the info returned from the db: */ cleanMemberSession($row["rsUser"], $row["rsPass"]); // and finally forward user to members page (populating the session id in the URL): header("Location: main.php"); } /* This function displays the default 'index' page for this script. This consists of just a simple login form for the user to submit their username and password. */ function doIndex() { /* Import the global $messages array. If any errors were detected above, they will be stored in the $messages array: */ global $messages; /* also import the $title for the page - note you can normally just declare all globals on one line - ie: global $messages, $title; */ global $title; } // drop out of PHP mode to display the plain HTML: $query1 = "SELECT * FROM outcodepostcodes"; $result = mysql_query($query1); ?> <!doctype html> <html> <head> <title>List of Pubs and Bars in the UK</title> <meta name="description" content="Pubs and bars in the UK, nightlife for food and drink" /> <meta name="keywords" content="Pubs, bars, List, uk, nightlife, drinking, drinks, beer, lager, food" /> <meta name="Content-Language" content="en-gb" /> <meta name="robots" content="FOLLOW,INDEX" /> <meta name="revisit-after" content="2 days" /> <meta name="copyright" content="jbiddulph.com" /> <meta name="author" content="John Biddulph - Professional web site design and development in the south of england mainly worthing and brighton" /> <meta name="distribution" content="Global" /> <meta name="resource-type" content="document" /> <link rel="stylesheet" type="text/css" href="css/reset.css" /> <link rel="stylesheet" type="text/css" href="css/style.css" title="default" /> <link rel="alternate stylesheet" type="text/css" href="css/style1.css" title="1" /> <link rel="alternate stylesheet" type="text/css" href="css/style2.css" title="2" /> <script type="text/javascript" src="js/stylechanger.js"></script> <script type="text/javascript" src="js/jquery-1.2.1.pack.js"></script> <script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script> <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <script type="text/javascript"> function lookup(inputString) { if(inputString.length == 0) { // Hide the suggestion box. $('#suggestions').hide(); } else { $.post("rpc.php", {queryString: ""+inputString+""}, function(data){ if(data.length >0) { $('#suggestions').show(); $('#autoSuggestionsList').html(data); } }); } } // lookup function fill(thisValue) { $('#inputString').val(thisValue); setTimeout("$('#suggestions').hide();", 200); } </script> <script type="text/javascript"> var RecaptchaOptions = { theme : 'white' }; </script> <link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css"> <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css"> </head> <body> <?php if($messages) { displayErrors($messages); }?> <header> <div id="title"> <h1>My Pub Space <a href="#" onClick="setActiveStyleSheet('default'); return false;"><img src="images/0.gif" width="15" height="15" border="0" alt="css style" /></a> <a href="#" onClick="setActiveStyleSheet('1'); return false;"><img src="images/1.gif" width="15" height="15" border="0" alt="css style" /></a> <a href="#" onClick="setActiveStyleSheet('2'); return false;"><img src="images/2.gif" width="15" height="15" border="0" alt="css style" /></a> <span> <form method="post" class="textbox" action="search.php"> Town/City: <input type="text" size="26" class="searchbox" value="" name="rsTown" id="inputString" onKeyUp="lookup(this.value);" onBlur="fill();" /> <div class="suggestionsBox" id="suggestions" style="display: none;"> <img src="images/upArrow.png" style="position: relative; top: -36px; left: 105px; z-index:1;" alt="upArrow" /> <div class="suggestionList" id="autoSuggestionsList"> </div> </div> <input type="image" src="images/go.png" height="30" with="30" value="GO" /> </form> </span> </h1> </div> </header> <nav> <ul> <li><a href="default.php">Home</a></li> <li><a href="#">Pubs</a></li> <li><a href="#">Members</a></li> <li><a href="#">Events</a></li> <li class="selected"><a href="#">Register</a></li> </ul> </nav> <section id="intro"> <header> <h2>Your social guide to going down the pub, online!</h2> </header> <p>Stuck in town with nowhere to go? Not sure if up the road or down the street is best? Need to be somewhere warm, cosy and friendly. Need a drink?....<br />You've come to the right place, mypubspace has it all!</p> <img src="images/pub.jpg" alt="pub" /> </section> <div id="content"> <div id="mainContent"> <section> <article class="blogPost"> <header> <h2>Register to My Pub Space</h2> <form name="register" method="post" action=""> <input name="LoginCount" type="hidden" value="1" /><input name="LastLogin" type="hidden" value="<%= Now()%>" /> <table width="100%"> <tr> <td class="text">Post Code</td> <td><span id="spryselect1"> <select name="rsPostCode" class="postcodedrop"> <?PHP while($row = mysql_fetch_array($result)) { echo '<option name=\"menuarea\" class=\"postcodedrop\" value='.$row['outcode'].' />'; echo $row['outcode']; }?> </select> <span class="selectRequiredMsg">Please select an item.</span></span><i>Helps us find your local pubs!</i></td> </tr> <tr> <td class="text">Gender:</td> <td>Male <input name="rsGender" type="radio" value="Male" /> Female <input name="rsGender" type="radio" value="Female" /></td> </tr> <tr> <td class="text">User Name:</td> <td><span id="sprytextfield1"> <input name="rsUser" type="text" class="textbox" id="rsUser" /> <span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td class="text">Password:</td> <td><span id="sprytextfield2"> <input name="rsPass" type="password" class="textbox" id="rsPass" /> <span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td class="text">Confirm Password:</td> <td><span id="sprytextfield3"> <input name="rsPass2" type="password" class="textbox" id="rsPass2" /> <span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td class="text">Email:</td> <td><span id="sprytextfield4"> <input name="rsEmail" type="text" class="textbox" id="rsEmail" /> <span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td class="text">Mobile:</td> <td><span id="sprytextfield5"> <input name="rsMobile" type="text" class="textbox" id="rsMobile" /> <span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td class="text">Age:</td> <td><span id="sprytextfield6"> <input name="rsAge" type="text" class="textbox" id="rsAge" /> <i>dd/mm/yyyy</i> <span class="textfieldRequiredMsg">A value is required.</span></span></td> </tr> <tr> <td> </td> <td><?php require_once('captcha/recaptchalib.php'); $publickey = "6Ldhhr4SAAAAACAnyp4o6NDHjZvRlS6rnHNa-Enz"; // you got this from the signup page echo recaptcha_get_html($publickey); ?></td> </tr> <tr> <td> </td> <td><input name="register" type="submit" class="button" value="Register" /></td> </tr> </table> </form> </header> </article> </section> </div> <aside> <section> <header> <h3>Members Login Area</h3> </header> <form method="post" class="textbox" action="<?php print $_SERVER["PHP_SELF"]; ?>"> Username: <br /> <input type="text" class="textbox" name="rsUser" value="<?php print isset($_POST["rsUser"]) ? $_POST["rsUser"] : "" ; ?>"> Password: <br /> <input type="password" class="textbox" name="rsPass"> <br /> <br /> <input name="login" type="submit" value="Login"> <br /> </form> <ul> <li><a href="#">Sign up</a></li> <li><a href="#">Forgot Password</a></li> </ul> </section> <section> <header> <h3>Archives</h3> </header> <ul> <li><a href="#">December 2008</a></li> <li><a href="#">January 2009</a></li> <li><a href="#">February 2009</a></li> <li><a href="#">March 2009</a></li> <li><a href="#">April 2009</a></li> <li><a href="#">May 2009</a></li> <li><a href="#">June 2009</a></li> </ul> </section> </aside> </div> <footer> <div> <section id="about"> <header> <h3>About</h3> </header> <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco <a href="#">laboris nisi ut aliquip</a> ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> </section> <section id="blogroll"> <header> <h3>Blogroll</h3> </header> <ul> <li><a href="#">NETTUTS+</a></li> <li><a href="#">FreelanceSwitch</a></li> <li><a href="#">In The Woods</a></li> <li><a href="#">Netsetter</a></li> <li><a href="#">PSDTUTS+</a></li> </ul> </section> <section id="popular"> <header> <h3>Popular</h3> </header> <ul> <li><a href="#">This is the title of a blog post</a></li> <li><a href="#">Lorem ipsum dolor sit amet</a></li> <li><a href="#">Consectetur adipisicing elit, sed do eiusmod</a></li> <li><a href="#">Duis aute irure dolor</a></li> <li><a href="#">Excepteur sint occaecat cupidatat</a></li> <li><a href="#">Reprehenderit in voluptate velit</a></li> <li><a href="#">Officia deserunt mollit anim id est laborum</a></li> <li><a href="#">Lorem ipsum dolor sit amet</a></li> </ul> </section> </div> </footer> <script type="text/javascript"> <!-- var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1"); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1"); var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2"); var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3"); var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4"); var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5"); var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6"); //--> </script> </body> </html> <?php } ?> Hello (I am posting to php because I don't know what is giving the problem), Let's say I have these links into my <div id="header>: Home Items Faq Cart and I use a Jquery to open my links inside my <div id="content"> The problem is between Items and Cart links (I am testing in ie9 and firefox 4): I am using an ajax code (I don't know if the problem is in here) to add items to cart and stay at my items page (not sending me to the cart page). Now, when I first load the page or is refreshed, everything works fine. BUT after I add something to the Cart if I visit the Cart.php and then return to my Items.php, when I click on the next item to be added I get a Blank page. Note: the Item is added normaly. This is happening also, when I click the UPDATE button inside my cart php to update quantities. Any suggestion? Thank you. (I don't know if is ajax, php, jquery or all three of them) |