no nothing is showing when the form is submitted.Does it work with the very first code in the table? Because with
in the DB table i have two columns
VID tinyint(4) auto_increment
VCode varchar(20)
Moderator: General Moderators
no nothing is showing when the form is submitted.Does it work with the very first code in the table? Because with
i only have one record added at the momentDo you know what is in $_POST['vouchCode'] and $row_rsVoucher['VCode'] ?
So that's what is in the database. Buhe what are the values of $_POST['vouchCode'] and $row_rsVoucher['VCode'] ? Is the value above loaded? What is passed in the form field?jonnyfortis wrote: i only have one record added at the moment
VID 1
VCode lot123£10
so i should try and echo them out?So that's what is in the database. Buhe what are the values of $_POST['vouchCode'] and $row_rsVoucher['VCode'] ? Is the value above loaded? What is passed in the form field?
Code: Select all
<?php echo $_POST['vouchCode']; ?><br />
<?php echo $row_rsVoucher['VCode']; ?> <br />Code: Select all
lot123�10 Code: Select all
So those don't look the same. What is that character in the database between "lot123" and "10" ?via a form in the backend of the website but they go into the DB correctlyChristopher wrote:Well ... the values in the database need to be able to match the values that can be entered in the form. How do you enter the voucher codes into the database?
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /homepages/6/d330188495/htdocs/beta/shopping-cart.php:1) in /homepages/6/d330188495/htdocs/beta/shopping-cart.php on line 4
Warning: Cannot modify header information - headers already sent by (output started at /homepages/6/d330188495/htdocs/beta/shopping-cart.php:1) in /homepages/6/d330188495/htdocs/beta/shopping-cart.php on line 5
Warning: Cannot modify header information - headers already sent by (output started at /homepages/6/d330188495/htdocs/beta/shopping-cart.php:1) in /homepages/6/d330188495/htdocs/beta/shopping-cart.php on line 6
Warning: Cannot modify header information - headers already sent by (output started at /homepages/6/d330188495/htdocs/beta/shopping-cart.php:1) in /homepages/6/d330188495/htdocs/beta/shopping-cart.php on line 7
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/6/d330188495/htdocs/beta/shopping-cart.php:1) in /homepages/6/d330188495/htdocs/beta/XCInc/XCart.inc on line 4Code: Select all
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache"); You changed the character coding in your database table? Or for your HTML document?jonnyfortis wrote:i tried changing UTF8 to charset= "utf8_general_ci" as suggested but am now getting errors
It says the there is output before line 4 in that file. So what is before the first header() call you list above (if that is line 4)?jonnyfortis wrote:Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /homepages/6/d330188495/htdocs/beta/shopping-cart.php:1) in /homepages/6/d330188495/htdocs/beta/shopping-cart.php on line 4 ... [syntax=php]header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache");
i changed the html documentChristopher wrote:You changed the character coding in your database table? Or for your HTML document?jonnyfortis wrote:i tried changing UTF8 to charset= "utf8_general_ci" as suggested but am now getting errors
It says the there is output before line 4 in that file. So what is before the first header() call you list above (if that is line 4)?jonnyfortis wrote:Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /homepages/6/d330188495/htdocs/beta/shopping-cart.php:1) in /homepages/6/d330188495/htdocs/beta/shopping-cart.php on line 4 ... [syntax=php]header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header ("Pragma: no-cache");
Code: Select all
<?php require_once('Connections/lotties.php'); ?>
<?php
// do not cache
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header ("Pragma: no-cache");