Jump to content

dazz_club

Members
  • Posts

    64
  • Joined

  • Last visited

Everything posted by dazz_club

  1. Great tutorial!!!cheers for that mate.
  2. oh, basic I/O cheers, i originaly thought "IO" was one of those smiley faces, but not obviously smiling, lol,cheers
  3. basic IO, is that java?thanks for your reply
  4. Hi guys,is it possible to create new html pages using php.heres what i would like to do:im in the process of creating several pages that are basicly the same but all that differs is the content/text and images. so i think for this i need some sort of template, as the layout never changes.So what i would like to do is possibly have a editing page thats online somewhere, like in an admin part where all i do is create new text, upload the images and press a magic button and it creates a new html page with the new changes that ive ammended.im thinking a CMS but is it possible to publish/create new html pages, not just edit original pages.is this possible?cheers
  5. Hi again,I dont know if you had the chance to create your own number plate, but ive noticed when i use all the drop down menus to create a number plate the price becomes something like £34.0000000009.is that my database doin that at all?cheers
  6. aw cheers guys,thanks for your help, worked a charm.thanks again
  7. so would i need to paste that in the link for "shopping cart" to be ablw to see what i have in my cart at any time then?cheers
  8. Hi there thanks for your quick reply?ive tried looking at the coding for "submitcart.php" for code that generates the memeber id and i cant find it.heres the code if it helps to point it out. <?session_start();include("inc/openconn.php");foreach($_GET as $getvar => $getval){ ${$getvar} = $getval; } foreach($_POST as $postvar => $postval){ ${$postvar} = $postval; } error_reporting(1);$memberid=session_id();$platetype = $_GET['platetype'];$platecost = $_POST['platecost'];$platprice = $_POST['plateprice'];$regno = $_POST['regno'];$frontpsize = $_POST['frontpsize'];$rearpsize = $_POST['rearpsize'];$ptype = $_POST['ptype'];$fonts = $_POST['fonts'];$sideimage_id = $_POST['sideimage_id'];$sideimageback_id = $_POST['sideimageback_id'];$rightsideimage_id = $_POST['rightsideimage_id'];$rightsideimageback_id = $_POST['rightsideimageback_id'];$customsideimg = $_POST['sideimage_url'];$platebg = $_POST['platebg'];$border = $_POST['border'];$slogan = $_POST['slogan'];$slogancolour = $_POST['slogancolour'];$frontsurr = $_POST['ddlsf'];$rearsurr = $_POST['ddlsr'];if($platetype=='s'){$tp=$platecost * 1;$sql="insert into cart (memberid,productname,platesize,price,quantity,total,orderdate,platetype) values ('$memberid','$regno','Standard','$platecost','1','$tp',NOW(),'$ptype')";$res=mysql_query($sql) or die(mysql_error());//$row=mysql_fetch_array($res);$sqlot="insert into ordertemp ( memberid, regno, platesize1, platesize2, fontid, sidebadgeid, sidebadgesrc, sidebadgeback, rightsidebadgeid, rightsidebadgeback, backgroundid, bordername,bottomtext,btc, frontsurround, rearsurround, price,status,platetype) values ('$memberid','$regno','$frontpsize', '$rearpsize', '$fonts', '$sideimage_id','$customsideimg','$sideimageback_id', '$rightsideimage_id', '$rightsideimageback_id' ,'$platebg','$border','$slogan','$slogancolour', '$frontsurr','$rearsurr' ,'$tp','CP','$ptype')";$resot=mysql_query($sqlot) or die(mysql_error());}//end if standardif($platetype=='r'){$tp=$platecost * 1;$sql="insert into cart (memberid,productname,productname1,platesize,platesize1,price,quantity,total,orderdate) values ('$memberid','$regno1','$regno2','$platesize1','$platesize2','$platecost','1','$tp',NOW())";$res=mysql_query($sql) or die("cart error".mysql_error());$row=mysql_fetch_array($res);$sqlot="insert into ordertemp (memberid,regno,regno1,platesize1,platesize2,fontid,bordername,bottomtext,btc,price,status) values ('$memberid','$regno1','$regno2','$platesize1','$platesize2','$fonts','$border','$slogan','$slogancolour','$tp','R')";$resot=mysql_query($sqlot) or die("ordertemp error".mysql_error());}//end if standardif($platetype=='m'){$tp=$platprice * 1;$sql="insert into cart (memberid,productname,productname1,platesize,platesize1,price,quantity,total,orderdate) values ('$memberid','$regno1','$regno2','$platesize1','$platesize2','$platprice','1','$tp',NOW())";$res=mysql_query($sql) or die("cart error".mysql_error());$row=mysql_fetch_array($res);$sqlot="insert into ordertemp (memberid,regno,regno1,platesize1,platesize2,fontid,bordername,bottomtext,btc,price,status) values ('$memberid','$regno1','$regno2','$platesize1','$platesize2','$fonts','$border','$slogan','$slogancolour','$tp','M')";$resot=mysql_query($sqlot) or die("ordertemp error".mysql_error());}//end if standardif($platetype=='p'){ $sqlp="select * from product where productid='$productid'"; $resp=mysql_query($sqlp) or die(mysql_error()); $rowp=mysql_fetch_array($resp); //$tp=$platecost * 1;$sql="insert into cart (memberid,productname,price,quantity,total,orderdate,status) values ('$memberid','".$rowp['productname']."','".$rowp['productprice']."','1','".$rowp['productprice']."',NOW(),'FL')";$res=mysql_query($sql) or die("cart error".mysql_error());$row=mysql_fetch_array($res);$sqlot="insert into ordertemp (memberid,regno,price,status,productid) values ('$memberid','".$rowp['productname']."','".$rowp['productprice']."','P','$productid')";$resot=mysql_query($sqlot) or die("ordertemp error".mysql_error());}//end if standard//$userid="$userid";if($platetype=='b'){$tp=$platecost * 1;$sql="insert into cart (memberid,productname,platesize,price,quantity,total,orderdate,platetype) values ('$memberid','$regno','Standard','$platecost','1','$tp',NOW(),'$ptype')";$res=mysql_query($sql) or die(mysql_error());$row=mysql_fetch_array($res);$sqlot="insert into ordertemp (memberid,regno,fontid,sidebadgeid,backgroundid,bordername,bottomtext,btc,price,status,platetype) values ('$memberid','$regno','$fonts','$sideimage_id','$platebg','$border','$slogan','$slogancolour','$tp','B','$ptype')";$resot=mysql_query($sqlot) or die(mysql_error());}//end if blackplate?><script language="JavaScript"> document.location.replace("showcart.php?memberid=<?=$memberid?>");</script> cheers
  9. aw man, i thought you gave up on me, but my mistake.heres the php code for "showcartinclude.php" which appears on showcart.php <?phpinclude("inc/openconn.php");?><script language="javascript">function checkqty() { var ch=0; len = document.frmcart.elements.length; var i=0; for( i=0; i<len; i++) { if (document.frmcart.elements[i].name=='txtqty[]') { if (isNaN(document.frmcart.elements[i].value)) { ch = 1; } } } if (ch == 1) { alert("Invalid Quantity .."); return false; } else { document.frmcart.action="updatecart.php"; document.frmcart.submit(); } }function onlyNumerics(i1){ code = event.keyCode if((code >=48) && (code <=57) || (code ==13)) //0 - 48 and 9 - 57 { if(code ==13) lostfocus(i1.value,j1,k1,m1); } else if (code==47) event.returnValue = true else event.returnValue = false}</script><link type="text/css" rel="stylesheet" href="common/design.css"><table width="100%" border="0" cellpadding="0" align="left"><form name="frmcart" action="shippinginformation.php?userid=<?=$userid?>" method="post"> <!-- <form name="frmcart" action="shippinginformation.php?userid=<?=$userid?>" method="post">--><input type="hidden" name="userid" value="<?=$userid?>"><? $sqlt="select * from ordertemp where memberid='" . $_GET['memberid'] . "'"; $rest=mysql_query($sqlt) or die(mysql_error()); while($rowt=mysql_fetch_array($rest)) {?><input type="hidden" name="ordertempid[]" value="<?=$rowt['ordertempid'];?>"><? }?> <tr> <td class="text"><font color="#330099">Instructions:</font><br> <p class="text"> To update quantity, please change the quantity and press 'Update cart' button. <br> To remove a product, please set the quantity to '0' and press 'Update cart' button. </font></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr bgcolor="#CCCCCC"> <td colspan="5" bgcolor="#999999"> <font face="Verdana" style="font-size: 10pt" color="#330099"><b> <p>Cart Items</p> </b></font> </td> </tr> <tr bgcolor="#CCCCCC"> <td width="30%" align="left" bgcolor="#CCCCCC"> <font face="Verdana" style="font-size: 8pt" color="#330099"><b>Products</b></font> </td> <td align="center" width="25%"> <font face="Verdana" style="font-size: 8pt" color="#330099"><b>Plate Size</b></font> </td> <td width="25%" align="center"> <font face="Verdana" style="font-size: 8pt" color="#330099"><b>Price</b></font> </td> <td align="center"> <font face="Verdana" style="font-size: 8pt" color="#330099"><b>Quantity</b></font> </td> <td align="center"> <font face="Verdana" style="font-size: 8pt" color="#330099"><b>Total Price</b></font> </td> </tr> <? $sqlc="select * from cart where memberid='" . $_GET['memberid'] . "'"; $resc=mysql_query($sqlc) or die(mysql_error()); $cnt=1; $subtotal=0; $resno=mysql_num_rows($resc); if($resno==0) { ?> <tr> <td height="16" colspan="5" align="center" class="bodyfont"><b>There are no any Product to Display</b></td> </tr> <tr> <? } else { while($rowc=mysql_fetch_array($resc)) { ?> <td class="text"> <? if($rowc['status']=='FL') { echo $rowc['productname']; } else { echo "Plate Reg. No.".$rowc['productname']; } ?> </td> <td align="center" class="text"><?=$rowc['platesize'];?></td> <td align="center" class="text">£<?=$rowc['price'];?></td><input type="hidden" name="cartid[]" value="<?=$rowc['cartid'];?>"> <input type="hidden" name="price[]" value="<?=$rowc['price'];?>"> <td align="center" class="text"><input type="text" class="text" name="txtqty[]" size="4" value="<?=$rowc['quantity'];?>" class="inputbox1"></td> <td align="center" class="text">£<?=$rowc['total'];?></td> </tr> <tr> <td class="text"><p style="margin-left:81"><?=$rowc['productname1'];?></p></td> <td align="center" class="text"><?=$rowc['platesize1'];?></td> <td align="center" class="text"> </td> <td align="center"> </td> <td align="center" class="text"> </td> </tr> <? $subtotal=$subtotal+$rowc['total']; $cnt++; }//end while cart ?> <tr> <td> </td> <td> </td> <td> </td> <td align="right" class="text"><font color="#330099"><P>Sub Total= </P></font> </td> <td align="center" class="text"><font color="#330099"><P><b>£<?=$subtotal?></b></P></FONT></td> </tr> <? }//end if ?> <tr bgcolor="#CCCCCC"> <td> </td> <td> </td> <td> </td> <td align="center"> </td> <td > </td> </tr> <tr> <td><a href="index.php"><font face="Verdana" style="font-size: 8pt">Continue Shopping</font></a></td> <td> </td> <td> </td> <td align="center"> <? if($resno!=0) { ?> <input name="button2" type="submit" class="inputbox" value="UPDATE CART" align="left" onclick="java script:checkqty(); return false;"> <? } ?> </td> <td> <? if($resno!=0) { ?> <input name="button" type="submit" class="inputbox" value="CHECK OUT" align="right"> <? } ?> </td> </tr> </table> </td> </tr> <tr> <td> <div align="right"> </div></td> </tr> </form></table> cheers
  10. hi there heres my website im working onhttp://www.waynesplates.comdatabase is mysql.when i add a product by clicking on the add to cart button, i can see all my prducts, but when i view cart its emptyhope it helps.
  11. Hi guysive got this shopping cart on my website that seems to be causing me a headache.If i was to be a customer and add some products to my cart and then contiue to shop. All is well. But if i was to carry on shopping and then decide to look at what products i have. When i click on the link to view cart, its empty.whats the problem?cheers
  12. Cheers guys, i gonna go with vchris`s suggestion instead.cheers, very much appreciated.
  13. Hi Guys,I would like to align these square boxes to eachother on the same line, but i dont know what position to use or the ones i have used dont work?At present one is on top of the other and i would like them to be side by side next to eachother.any pointers?heres the code below if it helps <!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=iso-8859-1" /><title>test css sheet</title><style type="text/css"><!--#box {height:100px;width: 100px;border: 1px solid #FFF;background-color:#FFFF00;}#box2 {height:100px;width: 100px;border: 1px solid #FFF;background-color:#CCC;right: auto;}--></style></head><body><div id="box"></div><div id="box2"></div>test</body></html>
×
×
  • Create New...