stockdalep
Members-
Posts
19 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
stockdalep's Achievements
Member (2/5)
0
Reputation
-
Thanks for your time, God knows why it did not work for me first time around
-
Hi I have a HTML email and inside this I need to use a PHP variable that contains a string with html line breaks inside it. Can this be done. Thanks for any help. $message =' <html> <body bgcolor="#FFFFCC" text="#000000"> <div align="center"> <h1>Thank you for registering</h1> <br> <table width="385" border="0" cellspacing="2" cellpadding="2" height="74"> <tr bgcolor="#CC9900"> <td>"$items"</td> </tr> </table> </div> </body> </html> ';
-
Hi I have a while loop that just prints outsome values from a database like this I need to put this into an email. I know the basics of php mail but cannot figure out how to get this into the body of the email. Thaks for any help. while($row = @mysql_fetch_array($order)) { // Increment the total cost of all items $totalCost += ($row["qty"] * $row["itemPrice"]); ?> <tr> <td width="15%" height="25"> <font face="verdana" size="1" color="black"> <?php echo $row["qty"]; ?> </font> </td> <td width="55%" height="25"> <b><font face="verdana" size="1" color="black"> <?php echo $row["itemName"]; ?> </font> </td> <td width="20%" height="25"> <b><font face="verdana" size="1" color="black"> £<?php echo number_format($row["itemPrice"], 2, ".", ","); ?> </font> </td> <td width="10%" height="25"> </td> </tr> <?php } // Display the total ?> <tr> <td width="100%" colspan="4"> <hr size="2" color="#FF6600" NOSHADE> </td> </tr> <tr> <td width="70%" colspan="2"> <td width="30%" colspan="2"> <font face="verdana" size="2" color="black"> <b>Total: £<?php echo number_format($totalCost, 2, ".", ","); ?></b> <p>
-
I have three pages page1.php has a radio button so has page2.php. I need to get the values of both buttons to display.php. I can get page2.php to the display.php page using the echo $_POST['myradio']; but this will not work for the radio button value in page1.php This is the order in which the pages are selected. page1.php page2.php display.php Thanks for any help
-
sameday and tuesday still conflict with one another in Mozzila Firefox.
-
I have this small piece of code inside a form it works fine in IE6 but inside Mozzila Firefox sameday and tuesday seem to become one. Example if I select tuesay sameday gets selected. Thanks for any ideas/help Form Address www.linfordfc.com/delivery_pickup_form.php <?php $timenow=date("Hi"); if($timenow < 1200) { ?> <input type="radio" name="delivery_day" value="sameday" /> <?php echo("Same Day"); } ?> <input type="radio" name="delivery_day" value="tuesday" /> <?php echo date('l jS F Y', strtotime('+2 days'))?></label> <label> <input type="radio" name="delivery_day" value="wednesday" /> <?php echo date('l jS F Y', strtotime('+3 days'))?></label> <label></label> </span></strong></div></td> </tr> <tr> <td><div align="center"><span class="style27"><strong><span class="style2"> <label> <input type="radio" name="delivery_day" value="thursday" /> <?php echo date('l jS F Y', strtotime('+4 days'))?></label> <label> <input type="radio" name="delivery_day" value="friday" /> <?php echo date('l jS F Y', strtotime('+5 days'))?></label> <label> <input type="radio" name="delivery_day" value="saturday" /> <?php echo date('l jS F Y', strtotime('+6 days'))?></label> </span></strong></span></div></td> </tr> <tr> <td bgcolor="#FFFFFF"> </td> </tr>
-
Hi I have a site that requires it users to select a delivery time. But I need to ensure that if the time has gone past 10 am they cannot select this day. I cannot figure out the question marks. if(strtotime("now") > ???????){ echo("no"); } else { echo("yes"); Thanks for any help.
-
Hi I have a database and shopping cart, the items are selected by using the session_id in a cookie. So if you log out your cart stays intact. select * from cart inner join household on cart.itemName = household.itemName where cart.cookieId = '" . GetCartId() . "'"); GetCartId() runs at first to check if the cookie exists or not, if not create a new one. But when the cookie has expired it writes another one which I have checked and it is a different session_id inside so in theory the last order in the database can now not be selected because the session_id that the SELECT statement uses has changed. But it still appears in the cart. I have echoed out the GetCartId() and it is different from the database cookieId field so I have no idea how this is happening. The only way of getting rid of the last order is to delete it from the database. Thanks for any help.
-
Thanks a lot worked great cheers.
-
Hi I am trying to populate a list\menu from a database with php if I run the code below it works fine. Except if I want to run it inside the table where I need it then I get the List\menu but its empty ?. <?php include "config.php"; $conn = mysql_connect("$db_host", "$db_user", "$db_pass") or die(mysql_error()); $result = mysql_query("SELECT * FROM area"); //start the select box echo '<select name="select">'; while ($row=mysql_fetch_assoc($result)){ //iterate through outputting options echo '<option value="'.$row['area'].'">'; } //close the select box echo '</select>'; ?> +++++++++++++++++++++++++++++++++++++++++++++++++++++ Inside the table its run as <tr> <th scope="row"><div align="right">Collection Area </div></th> <td> <?php include "config.php"; $conn = mysql_connect("$db_host", "$db_user", "$db_pass") or die(mysql_error()); $result = mysql_query("SELECT * FROM area"); //start the select box echo '<select name="select">'; while ($row=mysql_fetch_assoc($result)){ //iterate through outputting options echo '<option value="'.$row['area'].'">'; } //close the select box echo '</select>'; ?> </td> </tr> Thanks for any help
-
Solved it with select from * cart inner join mensdc on cart.itemId = mensdc.itemId union all select from * cart inner join items on cart.itemId = items.itemId
-
If I run it with just one join I get Resource id #4 With both we get nothing in the variable Resource id #3
-
Hi I have 3 Tables as below I am trying to join both mens_dc and items tables to cart. If I use this sql ========================================================= $result = mysql_query("select * from cart inner join items on cart.itemId = items.itemId where cart.cookieId = '" . GetCartId() . "' order by items.itemName asc"); ========================================================= We get the records from the items table but I cannot get both tables if I try ========================================================= select * from cart inner join items on cart.itemId = items.itemId inner join items on cart.itemId = items.itemId where cart.cookieId = '" . GetCartId() . "' order by items.itemName asc ===================================================== We then get nothing any ideas would be gratefully received Thanks. ====================================== Table Cart |cartId | cookieId | itemId | qty | Data 18 12344 2 1 19 12344 15 3 ====================================== Table items |itemId |itemName | itemDesc | itemPrice | Data 2 Trouser Trouser 5.50 ====================================== Table mens_dc |itemId |itemName | itemDesc | itemPrice | Data 15 Curtain Curtain 26.00 ======================================
-
This is what we have now but it still does not work. $result = mysql_query("SELECT * FROM cart inner JOIN items ON cart.itemId = items.itemId inner JOIN mens_dc ON mens_dc.itemId = mens_dc.itemId WHERE cart.cookieId = GetCartId()"); Original code $result = mysql_query("select * from cart inner join items on cart.itemId = items.itemId where cart.cookieId = '" . GetCartId() . "' order by items.itemName asc");
-
Hi Could anyone help me with this I need to join one more table to this query named mens_dc I have tried various syntex but to no avail. $result = mysql_query("select * from cart inner join items on cart.itemId = items.itemId where cart.cookieId = '" . GetCartId() . "' order by items.itemName asc"); Thanks for any help