Jump to content

PHP-Nut

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PHP-Nut's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Think i got it sorted now, didnt know you had to copy the php.ini to the windows Dir Paul.
  2. This morning ive reinstalled Windows XP on my delvelopment machine, ive installed IIS, PHP And MYSQL server 5.0 MSQL is working fine in the comand promt. I can run phpinfo() from localhost but something is not right, as when i start dreamweaver i get an error saying mysql module is not loaded? also in the phpinfo() result, there is no Mysql table?? im told there should be? If i try and run phpmyadmin, i get Cannot load mysql extension. Please check your PHP configuration Looked this up and edited the php.ini , but no luck so far? Any ideas?
  3. $headers = 'From:web@mywebaddress.co.uk'; There Wasnt a Space After FROM: Thats all that was wrong! DOH! Lol
  4. Got an Error about a Unexpected Text String When I tried Your Code, But Anyway it seams to work now.. So Im Happy to be honest i just think messenger didnt like the email address of web@etc... :-\ Wierd Paul
  5. $headers = "From: salesteam@mywebaddress.co.uk\r\n"; Seams to Work, Changed the 'To' address ?? ?? ah well lol Thanks Paul
  6. No, That Doesnt work either, When i got a email notification from MSN messenger with that code it said 'message from .' and then in the livemail it said 'unknown' and on opening the email it was showing the correct address???? do you think its down to the web host? Thanks Paul.
  7. $to = $row_GetID['email_addr'].',sales@mywebaddress.co.uk'; $subject = 'Thank you for your www.mywebaddress Order'.' ('.$row_GetID['ordernum_ID'].')'; $headers = 'From:web@mywebaddress.co.uk'; if (mail($to, $subject, $body,$headers)) { echo("<p>Email Sent To Customer Successfully!</p>"); } else { echo("<p>Email To Customer Failed!</p>"); }?> This Code Snippet works fine with normal email programs, such as outlook express but if i download the emails in hotmail, then the from header seams to display as Unknown? In the recieved Emails List, even tho if u open the email Itself, it does show the correct from email address? (ie our Website email address) Is the code wrong in anyway? Thanks Paul.
  8. <?php $number = 1234.56; echo number_format(round($number,0)-0.01,2);?> SOLVED
  9. <?php $number = 123.45; echo round(number_format($number,2),0)-0.01;?> echos out 122.99 as expected but........ <?php $number = 1234.56; echo round(number_format($number,2),0)-0.01;?> echos out 0.99 why is this happening? it seams anything that goes over 999.99 causes the round to mess up? what am i doing wrong?
  10. [sOLVED] in order to make this function correctly i had to use the products id field as a field in the qty textfield on the form.. ie product id = 102 $_SESSION['cart'] [prod_ID] = 102 // Session varible of Cart for given product when building the form i just had to make sure i used the prod_ID field as a key qty[102] etc.. so that when it came to use foreach it knew it was now an array.. Thanks Paul.
  11. $_POST['qty'] is an array for example if the form repeats and there is more than 1 instance of $_POST['qty'] as would be the case if more than 1 item was placed into the shopping basket..
  12. the form is just 1 txt field id= qty which reads the qtys from the session varibles ,1 for each line of the basket, and the the button id = update . the form works pefectly in that i can echo the new qty using echo $_POST['qty']. i just cant get the foreach to read it?
  13. ??? Im writing a shopping cart that uses Session variables, i have a form that displays the basket contents in a form so the user can update the item qtys. all was going fine until i tried to write the update script. Basically my idea was to read the qtys on the form and then update them to the newly submitted ones using foreach and the $_POST array.. but on submitting the form i get an error The Code is fairly Straight Forward.. here is the line with the error.. <?php if (isset($_POST['update'])) { foreach($_POST['qty'] as $key =>$val) { } } I have used the foreach with session arrays to build the shopping cart contents with no problems... Can somebody help..? Thanks
  14. [sOLVED] SELECT *, COUNT(mode_ID) As Number FROM order_item,products WHERE products.prod_ID=order_item.mode_ID GROUP BY mode_ID ORDER BY Number DESC Thanks to http://www.webdevelopersnotes.com/tutorials/sql/online_mysql_training_course_counting.php3
×
×
  • 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.