smclay Posted September 12, 2006 Share Posted September 12, 2006 Hi ive used a simple mail script showen below, what i need is information from a mysql database to be showen in the sections Game, Slots etc.. i[u]Email.php[/u]$mail = $email;$subject = "Your Order from KandoServers Order Id: $id ";$body = "Thank you for your order $fname $lname,Order Id:Username: $userPassword: $passGame:Number of Slots:Voice Server:Additional Voice Slots:Access:Contract Period:Branding:Server Name:Server Rcon:Server Location:Price:Once your payment has been veryfied you will recive an email with your Game Control Panel information please do not hesitate to contact us at support@kandoservers.net if you have any questions regarding your Order";$hh123 = "From: noreply@kandoservers.net\n";mail($mail,$subject,$body,$hh123);Information Needed to be Showen[u]viewcart.php[/u]$pagetitle = "Viewing Cart";$pagecontent = "<div align=\"left\" style=\" margin-top:31px; \">";$sid = session_id();$query_cart = "SELECT * FROM `cart` WHERE ct_session_id = '$sid'";$cart = mysql_query($query_cart, $conn) or die(mysql_error());$row_cart = mysql_fetch_assoc($cart);$totalRows_cart = mysql_num_rows($cart);$carttotal = mysql_query("SELECT * FROM `cart` WHERE ct_session_id = '$sid'");$total = 0;while($row_carttotal = mysql_fetch_assoc($carttotal)){ $pricehandle = $row_carttotal['ct_qty'] * $row_carttotal['pd_price']; $total = $total + $pricehandle;}$totalformat = $_SESSION['cy_symbol'];$totalhandle = $total * $_SESSION['cy_multiplier'];$totalformat .= number_format($totalhandle, 2);$pagecontent .= "<form name=\"updatecart\" action=\"func/updatecart.php\" method=\"post\"><div align=\"center\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td height=\"3\"><hr size=\"1\" color=\"#999999\" noshade></td> </tr> <tr> <td><div align=\"left\"><span class=\"lt_text\">Viewing Cart </span></div></td> </tr> <tr> <td height=\"3\"><hr size=\"1\" color=\"#999999\" noshade></td> </tr>"; if ($totalRows_cart == 0){ $pagecontent .= "<tr> <td><div align=\"left\"><span class=\"lt_text\">Cart is currently empty </span></div></td> </tr> <tr> <td height=\"3\"><hr size=\"1\" color=\"#999999\" noshade></td> </tr>"; } else { do{ $prodinfo = $row_cart['pd_info']; $pagecontent .= "<tr> <td height=\"3\"><div align=\"left\"> <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td valign=\"top\" class=\"lt_text\">"; list($server[game], $server[location], $server[size], $server[rental], $server[access], $server[branding], $server[voicet], $server[voice], $server[name], $server[rcon]) = split("ß", $prodinfo, 10); foreach($server as $key => $value){ list($title, $content) = split(":", $server[$key], 2); $gamez = str_replace("Game: ", "", $server[game]); if($title == "Voice"){ $row = mysql_fetch_assoc(mysql_query("SELECT * FROM `games` WHERE Name = '$gamez'")); if($row['Voice'] == 1){ $content = $content +16; } if($content == 0){ $content = "None"; } else { $content .= " man"; } } elseif($title == "Voice Type"){ $voice = trim($content); $row = mysql_fetch_assoc(mysql_query("SELECT * FROM `voice` WHERE Handle = '$voice'")); $content = " ".$row['Name']; } elseif($title != "Server Rcon" && $title != "Server Name") { $content = trim($content); $content = ucfirst($content); $content = " " . $content; } $pagecontent .= "<strong>".$title."</strong>: ".$content."<br>"; } $pagecontent .= "</td><td width=\"80\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td width=\"45%\" class=\"lt_text\"><strong>Qty:</strong></td> <td><input name=\"p_info[]\" type=\"hidden\" value=\""; $pagecontent .= $prodinfo; $pagecontent .= "\"> <input name=\"cart_id[]\" type=\"hidden\" value=\""; $pagecontent .= $row_cart['ct_id']; $pagecontent .= "\"> <input name=\"qty[]\" value=\""; $pagecontent .= $row_cart['ct_qty']; $pagecontent .= "\" type=\"text\" class=\"f_text form2\" size=\"3\"></td> </tr> </table></td> <td width=\"80\" class=\"lt_text\"><strong>Price:</strong> "; $tempprice = $row_cart['pd_price']; $tempprice = $tempprice * $_SESSION['cy_multiplier']; $priceformat = $_SESSION['cy_symbol']; $priceformat .= number_format($tempprice, 2); $pagecontent .= $priceformat; $pagecontent .= "</td> <td width=\"111\"><a href=\"func/removecart.php?c_id=" . $row_cart['ct_id'] . "\"><img alt=\"\" border=\"0\" src=\"images/xi0s_remove.gif\"></a></td> </tr> </table> </div></td> </tr> <tr> <td height=\"3\"><hr size=\"1\" color=\"#999999\" noshade></td> </tr>"; } while ($row_cart = mysql_fetch_assoc($cart)); } $pagecontent .= "<tr> <td height=\"3\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"> <tr> <td> </td> <td width=\"80\" class=\"lt_text\"><strong>Total:</strong> "; $pagecontent .= $totalformat; $pagecontent .= "</td> <td width=\"111\">"; if ($totalRows_cart != 0 ){ $pagecontent .= "<a href=\"javascript:document.updatecart.submit();\"><img alt=\"\" border=\"0\" src=\"images/xi0s_update.gif\"></a>"; } else { $pagecontent .= " "; } $pagecontent .= "</td> </tr>"; if ($totalRows_cart != 0) { $pagecontent .= "<tr> <td> </td> <td> </td> <td class=\"lt_text\"><a href=\"index.php?p=paymentinfo\"><img style=\"margin-top: 2px;\" alt=\"\" border=\"0\" src=\"images/xi0s_finalise.gif\"></a></td> </tr>"; } $pagecontent .= "</table></td> </tr> <tr> <td height=\"3\"><hr size=\"1\" color=\"#999999\" noshade></td> </tr></table></div></form>";$pagecontent .= "</div>";?> Quote Link to comment Share on other sites More sharing options...
fenway Posted September 12, 2006 Share Posted September 12, 2006 And the question is? Quote Link to comment Share on other sites More sharing options...
smclay Posted September 12, 2006 Author Share Posted September 12, 2006 [quote author=smclay link=topic=107767.msg432669#msg432669 date=1158063977]what i need is information from a mysql database to be showen in the sections Game, Slots etc..[/quote] list($server[game], $server[location], $server[size], $server[rental], $server[access], $server[branding], $server[voicet], $server[voice], $server[name], $server[rcon]) = split("ß", $prodinfo, 10);the above variabkes need to be added to the mail templateadd me to msn (no1_mexican@hotmail.co.uk) or yahoo (scott_mclay10) and i will try to explian, sorry but im a noob =( Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.