Jump to content

Drummin

Members
  • Posts

    1,004
  • Joined

  • Last visited

Everything posted by Drummin

  1. OK I did find this which is close to what I was doing. while ($row = $sql->fetch(PDO::FETCH_BOTH)){
  2. I'm attempting to convert a huge project I made with mysql to PDO. I have many cases where I would use a WHILE statement to return a query array. while($row= mysql_fetch_array($result)){ From what I've seen so far, it looks as though I need to use a foreach statement to do the same task. foreach ($dbh->query($sql) as $row){ Is that correct?
  3. I guess the page would have php extension, so the filter links should be changed to forsale.php?type=detached etc.
  4. Not sure if this is even a working copy for the "forsale" page, but maybe something you can work with. Please be sure things are setup for your DB/tables/fields before trying. <!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> <title>Mumtaz Properties</title> <link rel="stylesheet" href="http://www.mumtazproperties.hostei.com/cutouts/style.css"/> </head> <body> <!--Main Div Tag--> <div id="wrapper"> <div id="header"> <div id="logo"><a href="index.php"><img src="http://www.mumtazproperties.hostei.com/cutouts/Homepage/logo.png" alt=""/></a></div> </div> <div id="navigation"> <a id="Home" href="index.php" title="home"><span>home</span></a> <a id="Sale" href="forsale.html" title="for sale"><span>for sale</span></a> <a id="Rent" href="forrent.html" title="for rent"><span>for rent</span></a> <a id="Contact" href="contact.html" title="contact us"><span>contact us</span></a> </div> <div id="main"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> <div id="filter"><p class="houses" style="font-family:helvetica;color:#0155a1;font-size:14px;background:url(http://www.mumtazproperties.hostei.com/cutouts/forsale/filter.jpg) no-repeat;"><a href="forsale.html"><b><u>All</u></b></a> <br /> <a href="forsale.htm?type=detached"><span class="dh"><b><u>Detached Houses</u></b></span></a> <br /> <a href="forsale.htm?type=semi-detached"><span class="dh"><b><u>Semi-detached houses</u></b></span></a> <br /> <a href="forsale.htm?type=terraced"><span class="dh"><b><u>Terraced houses</u></b></span></a> <br /> <br /> <a href="forsale.htm?type=flats"><span class="dh"><b><u>Flats / Apartments</u></b></span></a> </p></div> </td> <td> <?php require_once 'mstr_ref.php'; $sql = new makeQuery(); $sql->manAdd('market_type', 'sale'); $types=array("detached","semi-detached","terraced","flats"); if(isset($_GET['type']) && in_array($_GET['type'], $types)){ $sql->manAdd('type', "{$_GET['type']}"); } $qry = $sql->sqlStart.$sql->stmt.'Group By property.id'; $results = mysql_query($qry) or die (mysql_error()."<br />|-|-|-|-|-|-|-|-|-|-|-|-<br />$qry"); if(mysql_num_rows($results) < 1){ die ('<div class="error">Sorry, No Results Match Your Search.</div>'); } while($row = mysql_fetch_assoc($results)){ echo '<div class="container" style="float:left;">'; echo '<div class="imageholder" style="float:left;">'; echo "<a href='{$row['url']}'><img class='image1' src='{$row['image_path']}' alt='{$row['summary']}' /></a> <br />"; echo '</div>'; echo '<div class="textholder" style="font-family:helvetica; font-size:14px; float:left; padding-top:10px;">'; echo "{$row['summary']}"; echo "<span style=\"color:#63be21;\"><br><br><b>{$row['bedrooms']} bedroom(s) {$row['bathrooms']} bathroom(s) {$row['receptions']} reception room(s)</b></span>"; if($row['parking'] != null){ echo "<span style=\"color:#63be21;\"><b> {$row['parking']} parking space(s)</b></span>"; echo '<div class="sline"><img src="cutouts/search/sline.png" alt=""/></div>'; } echo '</div>'; echo '<div style="clear:both"></div>'; } ?> </td> </tr> </table> </div> <div id="footer"> <a id="fHome" href="index.php" title="homepage"><span>homepage</span></a> <a id="fSale" href="forsale.html" title="for sale"><span>for sale</span></a> <a id="fRent" href="forrent.html" title="for rent"><span>for rent</span></a> <a id="fContact" href="contact.html" title="contact us"><span>contact us</span></a> </div> </div> </body> </html> <!-- www.000webhost.com Analytics Code --> <script type="text/javascript" src="http://stats.hosting24.com/count.php"></script> <noscript><a href="http://www.hosting24.com/"><img src="http://stats.hosting24.com/count.php" alt="web hosting" /></a></noscript> <!-- End Of Analytics Code -->
  5. Update these lines if(isset($_GET['bi'])) { $whereClauses[] = "bi=1"; } if(isset($_GET['print'])) { $whereClauses[] = "print=1"; } if(isset($_GET['online'])) { $whereClauses[] = "online=1"; }
  6. I believe fixing those extra duplicate input fields will fix the problem. There is also nesting issues with the start form tag and the hidden fields being outside <td> tags. This copy might be close. Not having codelighter makes it harder to see so this is untested. <?php // INPUT SCREEN FOR FREEZER STAFF TO APPLY WEIGHTS AND PICK PRODUCTS// echo "<br/><H2>Picking List for: ". $customerfullname->firstname." ". $customerfullname->lastname." </H2>"; // echo "<h3>Customer Number: ".$pickinglist['0']['CustomerID']."</h3><br/><br/>"; echo form_open('admin/pos/finishedorder'); ?> <table width="100%" border="1" cellpadding="5"> <tr> <th scope="col">Prod. ID</th> <th scope="col">Quantity</th> <th scope="col">Name</th> <th scope="col">Price lb</th> <th scope="col">Weight</th> <th scope="col"> Aprox. Expected Total</th> </tr> <?php //print_r($pickinglist); foreach ( $pickinglist as $value) { ?> <tr> <td><?php echo $value['ProdID'] ?></td> <td><?php echo $value['Quantity']?></td> <td><?php echo $value['Prodname']?></td> <td> <?php if ($value['Pricelb'] =='0.00'){ echo form_hidden('pricelb[]', $value['Pricelb']) "N/A";} else echo form_hidden('pricelb[]', $value['Pricelb']) $value['Pricelb']; ?></td> <td width="20" > <?php if ($value['Pricelb'] !== '0.00') { $data = array( 'name' => 'weight[]', 'id' => 'weight', 'maxlength' => '6', 'size' => '10', ); echo form_input($data); }else{ echo form_hidden('weight[]', '0.00') "N/A"; } ?></td> <td width="25" align="center"><?php $OrderValue = $value['Price'] * $value['Quantity']; echo(number_format($OrderValue,2));?> <?php //echo form_hidden('weight[]', '0.00'); echo form_hidden('prodid[]', $value['ProdID']); echo form_hidden('prodname[]', $value['Prodname']); echo form_hidden('orderid[]', $value['OrderID']); //echo form_hidden('pricelb[]', $value['Pricelb']); echo form_hidden('customerid', $value['CustomerID']); echo form_hidden('quantity[]',$value['Quantity']) ; echo form_hidden('price[]',$value['Price']); } ?> </td> </tr> </table> <br /> <?php echo "<span class=submit_button>".form_submit('submit','Update Order and Send For Payment >>')."</span>"; echo form_close(); ?>
  7. What about adding the hidden weight to the N/A line. <?php if ($value['Pricelb'] !== '0.00') { $data = array( 'name' => 'weight[]', 'id' => 'weight', 'maxlength' => '6', 'size' => '10', ); echo form_input($data); }else{ echo form_hidden('weight[]', '0.00') "N/A"; } ?> Not sure if this logic also needs to apply to the Pricelb section as well. <?php if ($value['Pricelb'] =='0.00'){ echo form_hidden('pricelb[]', $value['Pricelb']) "N/A";} else echo $value['Pricelb']; ?>
  8. Never seen coding like this before. See something new all the time. What happens if you comment out line 41 where it adds the input for $data. echo form_input($data); I would think there should be a better option for line 49 where you have weight 0.00 and adding the extra input with same name is messing with the array keys. Actually I got that backwards. Man I could see this if it was a regular form. Comment out the hidden weight line. What you need is ONE weight input field regardless of conditions like Pricelb etc. Still a little hard to see. Sorry
  9. This is not really a php issue. Please consider looking into divisions and floats for your layout instead of nested tables. By learning this you can load top, left, right then center then foot. You'll need to learn basic floats but a very simple example. Take your post to the html section of this site. <div class="header"></div> <div class="clear"></div> <div class="wrapper"> <div class="leftcolumn"></div> <div class="rightcolumn"></div> <div class="center"></div> </div> <div class="clear"></div> <div class="foot"></div>
  10. Probably would be a good idea to see your form to have a better understanding of what's being passed.
  11. Wondering what else you have going on that might change things. As far as I can tell the array keys should be matching. Do you get mis-match when not using the sort()? Also why does you WeightArray show six keys ([5] being the last) when the others all have four?
  12. Well anytime you set a session= value this has to be done before <html>. Here's a quick reorganization of your page, moving processing above include("includes/header.php"); No way for me to test how this changes things for you, but it looks right. <?php session_start(); $page_title = 'Booking an event'; //grab variables $gender = $_POST["gender"]; $fname = $_POST["fname"]; $lname = $_POST["lname"]; $mobile = $_POST["mobile"]; $email = strtolower($_POST["email"]); $password = $_POST["password"]; $cpassword = $_POST["cpassword"]; $add1 = $_POST["add1"]; $add2 = $_POST["add2"]; $add3 = $_POST["add3"]; $add4 = $_POST["add4"]; $pcode = $_POST["pcode"]; $dd = $_POST["day"]; $mm = $_POST["month"]; $yyyy = $_POST["year"]; $news = $_POST["newsopt"]; $today = date('Y-m-d H:i:s'); $cust_gender = $gender; $username = $_POST["email"]; $id = $_GET["id"]; //error_reporting(E_ALL); $error = array(); include("dbconn2.php"); include("functions.php"); $query1 = "Select cre_email from ".pd_credentials." where cre_email = '$email'"; $result1 = mysql_query($query1); $row = mysql_fetch_array($result1); if($row['cre_email'] == $email) { if($row['cre_email'] <> '') { $error[7] = "<li>supplied email address already exists - please telephone if you have forgotten your password or click here to have your password emailed to your registered email address <form action='/pwreminder.php?id=$id' method='post'><input type='hidden' name='email' value='$email' /><input type='submit' name='submit' value='Email me' /></form></li>"; } } echo mysql_error(); mysql_close(); list($user, $mailDomain) = split("@", $email); if (checkdnsrr($mailDomain, "MX")) { $msg = 1; } if(!isset($_POST['gender'])) { $error[0] = "<li>Please supply your gender</li>"; } if(strlen($_POST['fname']) > "30" || strlen($_POST['fname']) < "1" || trim($_POST['fname']) == '') { $error[1] = "<li>Please supply your first name.</li>"; } if(strlen($_POST['lname']) > "10" || strlen($_POST['lname']) < "1" || trim($_POST['lname']) == '') { $error[2] = "<li>Please supply your last name</li>"; } if(preg_match('/^[\(\. ]?\d{4}[\)\. -]*\d{1}[\. -]*\d{6}$/', $_POST['mobile']) === 0) { $error[3] = "<li>Please check you have entered a valid mobile number</li>"; } if ($msg != 1) { $error[4] = "<li>There is an error with the email address $email you supplied</li>"; } if(trim($_POST['password']) != trim($_POST['cpassword'])) { $error[5] = "<li>supplied passwords do not match</li>"; } if(strlen($_POST['password']) < "4" || strlen($_POST['password']) > "14" || trim($_POST['password']) == '') { $error[6] = "<li>Your password was not 4 - 14 characters long</li>"; } if(strlen($_POST['day']) > "1" || strlen($_POST['month']) > "1" || strlen($_POST['year']) > "1") { if(checkdate($mm , $dd , $yyyy) != "false") { $error[9] = "<li>Please check your date of birth</li>"; } } if ($_FILES['photo']['type']<>"" && $_FILES['photo']['type'] <> "image/jpg" && $_FILES['photo']['type'] <> "image/jpeg" && $_FILES['photo']['type'] <> "image/pjpeg") { $error[10] = "<li>Invalid photo type. JPG only.</li>"; } // Enter the maximum file size in bytes (1 MB) $max_size = 1048576; if (($_FILES['photo']['size'] > $max_size || $_FILES['photo']['size']==0) && ($_FILES['photo']['name']<>"")) { $error[11] = "<li>Invalid photo size. Limit 1MB.</li>"; } if(count($error) < 1) { $_SESSION['loggedin'] = 1; $_SESSION['cre_email'] = $username; if(($yyyy<>"" )&&($mm<>"")&&($dd<>"")) { $dob = "'".$yyyy."/".$mm."/".$dd."'"; } else { $dob = "null"; } $today = mysql_escape_string(trim($today)); $cust_gender = mysql_escape_string(trim($_POST['gender'])); $fname = mysql_escape_string(trim($_POST['fname'])); $lname = mysql_escape_string(trim($_POST['lname'])); $mobile = mysql_escape_string(trim($_POST['mobile'])); $email = mysql_escape_string(trim($_POST['email'])); $password = mysql_escape_string(trim($_POST['password'])); $add1 = mysql_escape_string(trim($_POST['add1'])); $add2 = mysql_escape_string(trim($_POST['add2'])); $add3 = mysql_escape_string(trim($_POST['add3'])); $add4 = mysql_escape_string(trim($_POST['add4'])); $pcode = mysql_escape_string(trim($_POST['pcode'])); $news = mysql_escape_string(trim($_POST['newsopt'])); $market = mysql_escape_string(trim($_POST['market'])); include("dbconn2.php"); $query1 = "SELECT MAX(cust_id) as id FROM pd_customers"; $result1 = mysql_query($query1); while($row = mysql_fetch_array($result1)) { $newID = $row['id'] + 1; } $_SESSION["cust_id"] = $newID; $hasphoto = 0; $url = $_FILES['photo']['name']; if($url<>"") {$hasphoto = 1;} include("dbconn2.php"); $addcust = MYSQL_QUERY("INSERT INTO pd_customers (cust_id,cust_email,cust_surname,cust_title,cust_first_names,cust_mobile,cust_gender,cust_dob,cust_line_1,cust_line_2,cust_line_3,cust_line_4,cust_post_code,cust_country,cust_landline,cust_news,cust_contact, photo)". "VALUES ('$newID', '$email', '$lname', '', '$fname', '$mobile', '$cust_gender', $dob, '$add1', '$add2', '$add3', '$add4', '$pcode', '', '', '$news', '$market', $hasphoto)"); echo(mysql_error()); mysql_close(); include("dbconn2.php"); $addlog = MYSQL_QUERY("INSERT INTO pd_credentials (cre_email,cre_cust_id,cre_password,cre_activated,cre_last_login,cre_disabled,cre_role)". "VALUES ('$email', $newID, '$password', '$today', '$today', '0', 'user')"); echo(mysql_error()); mysql_close(); //success... //now upload the image if it exists $msg = " NEW MEMBER @PINKDATE <br/> <br/> A new member has signed up at PinkDate. <br/><br/> Name: $fname $lname <br/><br/> "; if($hasphoto==1) { $msg.="This member has uploaded a new photo. Login then <a href='http://www.pinkdate.co.uk/adminupdc.php?email=$email'/>click here</a> to view and approve it.<br/><br/>"; $idir = realpath("./photos/"); // Path To Images Directory $tdir = realpath("./photos/thumbs/"); // Path To Thumbnails Directory $twidth = "100"; // Maximum Width For Thumbnail Images $theight = "125"; // Maximum Height For Thumbnail Images $file_ext = strrchr($_FILES['photo']['name'], '.'); // Get The File Extention In The Format Of , For Instance, .jpg, .gif or .php $copy = copy($_FILES['photo']['tmp_name'], "/home/www/pinkdate/photos/photo$newID.jpg"); // Move Image From Temporary Location To Permanent Location if ($copy) { // If The Script Was Able To Copy The Image To It's Permanent Location $simg = imagecreatefromjpeg("/home/www/pinkdate/photos/photo$newID.jpg"); // Make A New Temporary Image To Create The Thumbanil From $currwidth = imagesx($simg); // Current Image Width $currheight = imagesy($simg); // Current Image Height if ($currheight > $currwidth) { // If Height Is Greater Than Width $zoom = $twidth / $currheight; // Length Ratio For Width $newheight = $theight; // Height Is Equal To Max Height $newwidth = $currwidth * $zoom; // Creates The New Width } else { // Otherwise, Assume Width Is Greater Than Height (Will Produce Same Result If Width Is Equal To Height) $zoom = $twidth / $currwidth; // Length Ratio For Height $newwidth = $twidth; // Width Is Equal To Max Width $newheight = $currheight * $zoom; // Creates The New Height } $dimg = imagecreate($newwidth, $newheight); // Make New Image For Thumbnail imagetruecolortopalette($simg, false, 256); // Create New Color Pallete $palsize = ImageColorsTotal($simg); for ($i = 0; $i < $palsize; $i++) { // Counting Colors In The Image $colors = ImageColorsForIndex($simg, $i); // Number Of Colors Used ImageColorAllocate($dimg, $colors['red'], $colors['green'], $colors['blue']); // Tell The Server What Colors This Image Will Use } imagecopyresized($dimg, $simg, 0, 0, 0, 0, $newwidth, $newheight, $currwidth, $currheight); // Copy Resized Image To The New Image (So We Can Save It) imagejpeg($dimg, "/home/www/pinkdate/photos/thumbs/photo$newID.jpg"); // Saving The Image imagedestroy($simg); // Destroying The Temporary Image imagedestroy($dimg); // Destroying The Other Temporary Image } else { print '<font color="#FF0000">ERROR: Unable to upload image.</font>'; // Error Message If Upload Failed } } $message = " <p>Hi $fname</p> <p>Thank you for joining Pinkdate</p> <p>Your user name is your email address<strong> "; $message .= $email; $message .= "</strong></p>"; $message .= "<p>Your password is <strong>"; $message .= $password; $message .= "</strong></p><br />"; $message .= "<p><font size=\"-2\">You can change your details in My Account after you have logged in. If there are any problems please"; $message .= " do not hesitate to get in touch on 08444 930615."; include("email.php"); sendEmail($email, "Your PinkDate Membership", $message); $msg.= "To view the members details, <a href='http://www.pinkdate.co.uk/adminupdc.php?email=$email'/>click here</a>.<br/><br/>"; sendEmail("bookings@pinkdate.co.uk", "New PinkDate Membership", $msg); echo "<script language=\"JavaScript\">window.location='pd_register-confo.php'</script>"; } include("includes/header.php");?> <!--main Nav--> <?php include('includes/mainNav.php'); ?> <!--Section Title--> <h1><?php echo $page_title; ?></h1> <!--primary Content--> <div id="primaryContent"> <h2><span class="RedGbColor">Subscribe Now</span></h2> <p><br /> Register here and create your profile and to attend an event of your choice (link please).<br /> </p> </div> <!--Main Content--> <div id="mainContent"> <?php if(count($error) > 0) { echo ("Sorry $fname $lname there seems to be some sort of problem with your Data Input.<br />Please correct the errors listed below. <ul>" . $error[0] . "" . $error[1] . "" . $error[2] . "" . $error[3] . "" . $error[4] . "" . $error[5] . "" . $error[6] . "" . $error[7] . "" . $error[8] . "" . $error[9] . "" . $error[10] . "" . $error[11] . "</ul></div>"); // this will print the errors that occurred $male_status = 'unchecked'; $female_status = 'unchecked'; $selected_radio = $_POST['gender']; if ($selected_radio == 'm') { $male_status = 'checked'; } else if ($selected_radio == 'f') { $female_status = 'checked'; } echo (" <div id='middlerightpad'> <form action='register.php?id=$id' method='post'> <input type='hidden' name='male_status' value='$male_status' /> <input type='hidden' name='female_status' value='$female_status' /> <input type='hidden' name='fname' value='$fname' /> <input type='hidden' name='lname' value='$lname' /> <input type='hidden' name='mobile' value='$mobile' /> <input type='hidden' name='email' value='$email' /> <input type='hidden' name='password' value='$password' /> <input type='hidden' name='cpassword' value='$cpassword' /> <input type='hidden' name='add1' value='$add1' /> <input type='hidden' name='add2' value='$add2' /> <input type='hidden' name='add3' value='$add3' /> <input type='hidden' name='add4' value='$add4' /> <input type='hidden' name='pcode' value='$pcode' /> <input type='hidden' name='day' value='$dd' /> <input type='hidden' name='month' value='$mm' /> <input type='hidden' name='year' value='$yyyy' /> <input type='hidden' name='newsopt' value='$news' /> <label for='submit' class='pinkSH'>Go back to Booking</label> <input type='submit' name='submit' value='Booking' class='btn_sm' /> </form> "); } ?> </div> <!--primary Content--> <div id="primaryContent"> </div> <!--Footer--> <?php include('includes/footer.php'); ?> </div> </div> </body> </html>
  13. Yep. same situation on this page. Can't set any sessions after sending anything to browser.
  14. Move all processing to top of page. Sessions need to be set before output is sent to browser.
  15. You probably could sort() the list first then do the foreach loop. <?php function finishedorder(){ sort($_POST['prodid']); foreach ($_POST['prodid'] as $arrkey => $prodid){ $pricelb = $_POST['pricelb'][$arrkey]; $price = $_POST['price'][$arrkey]; $orderid = $_POST['orderid'][$arrkey]; $weight = $_POST['weight'][$arrkey]; $ordervalue = $pricelb * $weight; $sql =" UPDATE confirmedorder SET weight='$weight', ordervalue='$ordervalue', picking = 'finished', sale = 'open' WHERE prodID = '$prodid' AND OrderID = '$orderid'"; $this->db->query($sql); } } ?>
  16. Ya, you can't set or modify sessions after anything is sent to the browser. You should have 1. Processing of posts/set sessions/ any header redirect tags header() tags etc 2. html head and body tags 3. visual content/forms etc. 4. close out your page On your pages I don't see item 2, but I do see item 1 and item 3 mixed together. Work on restructuring things.
  17. <?php session_start(); echo "<html> <head><title>Posted Variables</title></head> <body>"; $to = "artdept@calmktg.com"; $subject = "SCE SONGS ORDER FORM"; $email = $_REQUEST['email']; $message=""; foreach ($_POST as $field => $value) { $message .="$field = $value<br>"; } $headers = "From: $email"; $sent = mail($to, $subject, $message, $headers) ; if($sent) {print "Your mail was sent successfully"; } else {print "We encountered an error sending your mail"; } ?> </body> </html>
  18. Don't use short tags <? ?>, example: </head> <body> <? //require_once("fb.php")?> <div id="wrap"> <? include('header.php'); include("session.php"); ?> <div class="wraper"> Should be: </head> <body> <?php //require_once("fb.php")?> <div id="wrap"> <?php include('header.php'); include("session.php"); ?> <div class="wraper"> Any "session changes" or header("location:") lines need to be done BEFORE ANY output is sent to the browser. ...and you can see in the code I posted above, you include session.php within the body section of your page. This include tag needs to be moved to the top of your page after your include("conn.php"); tag where you said that session_start() is added. As far as I can see, after making these changes things should work.
  19. Sorry if I'm not seeing the big picture and how this code fits into what you have going, but it would seem to me that a simple foreach loop would grab the the "post array key" and using this you identify each item and make this update. Again sorry if this is way off. <?php function finishedorder(){ foreach ($_POST['prodid'] as $arrkey => $prodid){ $pricelb = $_POST['pricelb'][$arrkey]; $price = $_POST['price'][$arrkey]; $orderid = $_POST['orderid'][$arrkey]; $weight = $_POST['weight'][$arrkey]; $ordervalue = $pricelb * $weight; $sql =" UPDATE confirmedorder SET weight='$weight', ordervalue='$ordervalue', picking = 'finished', sale = 'open' WHERE prodID = '$prodid' AND OrderID = '$orderid'"; $this->db->query($sql); } } ?>
  20. Are all your form tags arrays? name='prodname[]' etc. Seems like a simple foreach loop should handle this fine. Btw. code with <?php ?> will have color. ALSO is product id ever duplicated in the form? Just wondering why you have count($_POST['prodid']). OK, I assume this is an array... Never mind.
  21. What do you see when adding echo sql. Does product 101 have weight of 7? $sql =" UPDATE confirmedorder SET weight='$weight[$i]', ordervalue='$ordervalue', confirmedorder.picking = 'finished', confirmedorder.sale = 'open' WHERE prodID = '$prodid[$i]' AND OrderID = '$orderid[$i]' ; "; echo "$sql<br />";
  22. Well that cool. At least you know why.
  23. If you were to comment out that header in the session check area, are you on main_interface.php when logging in with correct credentials? Trims should be done on posted contents before session is set. $username = trim($_POST['username']); $password = md5(trim($_POST['password']));
  24. Interesting, so print preview does First Caps on field names. They don't match your insert names.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.