Jump to content

Coconut47

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Coconut47's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I really have 'a','b','c' in my database. I don't understand at all...
  2. Hello, I have some trouble to display result from my enum tab I did this : if ($level == "a"){ $level = "Level 1"; }else if ($level =="b"){ $level = "Level 2"; }else { $level = "Level 3"; } and on my html <?php echo $level; ?> it display Level 3 on all record... Any idea what I'm doing wrong?
  3. Verry good tutorial This is the script I was looking for for guide! just for my info when you create your database to your create 6 photo field or just one?
  4. Hi, I don't know anything about php and Mysql but I found a tutorial for a shopping cart and everything is working. The only thing is they don't have the email part in the totorial so I'm kind of stuck with my file. Anyone know how to email the resul to me via email with this code? <? include("includes/db.php"); include("includes/functions.php"); if($_REQUEST['command']=='update'){ $name=$_REQUEST['name']; $email=$_REQUEST['email']; $address=$_REQUEST['address']; $phone=$_REQUEST['phone']; $result=mysql_query("insert into customers values('','$name','$email','$address','$phone')"); $customerid=mysql_insert_id(); $date=date('Y-m-d'); $result=mysql_query("insert into orders values('','$date','$customerid')"); $orderid=mysql_insert_id(); $max=count($_SESSION['cart']); for($i=0;$i<$max;$i++){ $pid=$_SESSION['cart'][$i]['productid']; $q=$_SESSION['cart'][$i]['qty']; $price=get_price($pid); mysql_query("insert into order_detail values ($orderid,$pid,$q,$price)"); } die('Thank You! your order has been placed!'); } ?> <!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>Billing Info</title> <script language="javascript"> function validate(){ var f=document.form1; if(f.name.value==''){ alert('Your name is required'); f.name.focus(); return false; } f.command.value='update'; f.submit(); } </script> </head> <body> <form name="form1" onsubmit="return validate()"> <input type="hidden" name="command" /> <div align="center"> <h1 align="center">Billing information</h1> <table border="0" cellpadding="2px"> <tr><td>Total:</td><td><?=get_order_total()?></td></tr> <tr><td>Name :</td><td><input type="text" name="name" /></td></tr> <tr><td>Address :</td><td><input type="text" name="address" /></td></tr> <tr><td>Email :</td><td><input type="text" name="email" /></td></tr> <tr><td>Phone :</td><td><input type="text" name="phone" /></td></tr> <tr><td> </td><td><input type="submit" value="Place Order" /></td></tr> </table> </div> </form> </body> </html>
×
×
  • 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.