Jump to content

manuka

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

manuka's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for that, basically I would have been on the right track a lot earlier if I had spotted that is was trying to multiply the wrong variable. Also cheers for the heads up on using the pre tags, that does make the formatting much more user friendly.
  2. Array ( [0] => 1 [count] => 1 [1] => bananas [itemtype] => bananas [2] => 5 [weight] => 5 [3] => 2011-08-23 [created] => 2011-08-23 [4] => 26 [uid] => 26 ) 10 fish kgs Array ( [0] => 10 [count] => 10 [1] => fish [itemtype] => fish [2] => 10 [weight] => 10 [3] => 2011-08-23 [created] => 2011-08-23 [4] => 25 [uid] => 25 ) 10 weevil kgs Array ( [0] => 10 [count] => 10 [1] => weevil [itemtype] => weevil [2] => 0 [weight] => 0 [3] => 2011-08-23 [created] => 2011-08-23 [4] => 24 [uid] => 24 ) 10 for kgs Array ( [0] => 10 [count] => 10 [1] => for [itemtype] => for [2] => 2 [weight] => 2 [3] => 2011-08-23 [created] => 2011-08-23 [4] => 23 [uid] => 23 ) 12 goon kgs
  3. Hi btherl, Yeah I can understand enough PHP to get why it doesn't work, however I don't quite know how to get it functioning how I need it to work....
  4. With that I get a return of "0"
  5. According to Firefox's error consol there were a couple of errors with an attached css page but nothing that should affect this
  6. Hi I'm having an issue with a piece of code, it pretty much works but the line to output the total weight only seems to be picking up the count and not multiplying it by the weight. Any ideas why this is? Thanks in advance <?php mysql_connect("localhost", "*****", "******") or die(mysql_error()); mysql_select_db("inventory") or die(mysql_error()); $data = mysql_query("SELECT * FROM testDB ORDER BY uid DESC LIMIT 30") or die(mysql_error()); Print "<p>"; while($info = mysql_fetch_array( $data )) { $totalweight = ($info['count' * 'itemtype']); Print $info['count'] . " "; Print $info['itemtype'] . " "; Print $totalweight . " kgs <br />"; } Print "</p>"; ?>
  7. Bingo! That worked. Thanks very much for your help much appreciated
  8. Yeah I know this is a pretty basic problem, but it's been a while since I've worked with PHP and I'm having a real problem getting it functioning properly. My real issue is the user inputed information is not getting sent with the email. I haven't added all the fields to the email yet as I'm trying to get it right first then populating all of the fields. Anyway my code is below: hairinfo.html <form name="hairinfo" method="POST" action="hair/EmailToForm.php"> <table border="0" align="center" background="images/blackopaque.png" class="contact"> <tr> <td width="100">Name</td> <td><input name="name" type="text" id="name" class="contactBox" size="30"></td> </tr> <tr> <td width="100">Service</td> <td class="contactBox"> <input type="radio" name="hairservice" value="Cut" id="hairservice"> Cut<br> <input type="radio" name="hairservice" value="Colour" id="hairservice"> Colour<br> <input type="radio" name="hairservice" value="Hair Up" id="hairservice"> Hair Up<br> <input type="radio" name="hairservice" value="Set" id="hairservice"> Set<br> <input type="radio" name="hairservice" value="Style" id="hairservice"> Style<br></td> </tr> <td width="100">Address</td> <td><input name="address" type="text" class="contactBox" id="address" size="30"></td> </tr> <tr> <td width="100">City</td> <td><input name="city" type="text" class="contactBox" size="30"></td> </tr> <tr> <td width="100">Date</td> <td><input name="date" type="text" class="contactBox160" id="date"/> <script language="JavaScript"> new tcal ({ // form name 'formname': 'testinput', // input name 'controlname': 'testinput' });</script> </td> </tr> <tr> <td width="100">E-Mail</td> <td><input name="email" type="text" id="emailaddress" class="contactBox" size="30" ></td> </tr> <tr> <td width="100">Phone Number</td> <td><input name="phone" type="text" class="contactBox" size="30" id="phone"></td> </tr> <tr> <td width="100"> </td> <td> </td> </tr> <tr> <td width="100" valign="top">Brief</td> <td><textarea name="message" cols="23" rows="9" class="contactBox" id="message"></textarea></td> </tr> <tr> <td width="100"></td> <td><input name="send" type="submit" class="inputField" value="Send" /></td> </tr> <tr> <td colspan="2"><em>For a faster reply, text your booking information to: 021 0259 6543</em></td> </tr> </table> </form> hair/EmailToForm.php <?php // Contact subject $subject ='Hair Booking'; // Details $message="$message"; // Mail of sender $mail_from="$emailaddress"; // From $header="from: $name <$mail_from>"; // Enter your email address $to ='kerry@manukadesign.co.nz'; $send_contact=mail($to,$subject,$message,$header); // Check, if message sent to your email // display message "We've recived your information" if($send_contact){ echo "Thanks, we've recived your contact information<br /> and we will be in touch as soon as possible about your request"; } else { echo "ERROR"; } ?> I would really appreciate any help offered. Thanks.
×
×
  • 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.