Jump to content

HuggieBear

Members
  • Posts

    1,899
  • Joined

  • Last visited

Everything posted by HuggieBear

  1. The problem is still with the original row Try copying and pasting this into it... [code=php:0] if ((empty($_POST['user'])) && (empty($_POST['pass']))) { [/code] Regards Huggie
  2. I'm aware of that, but you need to show me what the SQL code is that's getting the recordset for that drop down. Based on what you've said in the past, I'd imagine it's something like... [code] <select name="selectCountry" id="selectCountry" title="<?php echo $row_rsAccomedit['hotelCountry']; ?>"> <?php   do { ?> <option value="<?php echo $row_rsRegion['Id']?>"<?php if (!(strcmp($row_rsRegion['Id'], $row_rsAccomedit['regionId']))) {echo "SELECTED";} ?>><?php echo $row_rsRegion['regionName']?></option> <?php   }   while ($row_rsRegion = mysql_fetch_assoc($rsRegion));       $rows = mysql_num_rows($rsRegion);       if($rows > 0) {         mysql_data_seek($rsRegion, 0);         $row_rsRegion = mysql_fetch_assoc($rsRegion);   } ?> </select> [/code] Huggie
  3. Sorry, didn't explain myself there... I mean what's your SQL select statement.. eg. SELECT countryId FROM... etc. Huggie
  4. What's the select statement you're using to get the code for the dropdown? Huggie
  5. There's a tutorial for one here at [url=http://www.phpfreaks.com/tutorials/85/6.php]PHP Freaks[/url]. It says it's for beginners, and it looks as though it has lots of advanced features. Regards Huggie
  6. [quote] It should be... "SELECT * FROM users WHERE user='$user' &&  pass='$pass'"; [/quote] I think it's preferable to use AND when dealing with strings isn't it?... "SELECT * FROM users WHERE user='$user' [b]AND[/b] pass='$pass'"; Regards Huggie
  7. Hi, Change: [code=php:0]echo $thefiles[$number_holder];[/code] to: [code=php:0]echo $thefiles[$number_holder]['filename'];[/code] Regards Huggie
  8. Assuming that [code=php:0]$row_rsRegionedit['countryId'][/code] came from a select on the tabRegion, then yes, it looks good to me. Regards Huggie
  9. Hotmail does tend to move it to the junk folder, but below is a good set of headers that work well. [code]<?php   $from_name = "HuggieBear";   $from_address = "myemail@mydomain.co.uk";     $to_name = "mohammedsk";   $to_address = "$to_name <youremail@yourdomain.co.uk>";     $subject = "Hotmail likes these headers";   $message = "Give these a try and see if you have any luck";     $headers .= "MIME-Version: 1.0\r\n";   $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";   $headers .= "From: $from_name <$from_address>\r\n";   $headers .= "Reply-To: $from_name <$from_address>\r\n";   $headers .= "X-Priority: 1\r\n";   $headers .= "X-MSMail-Priority: High\r\n";   $headers .= "X-Mailer: My Test Mailer";   $success = mail($to_address, $subject, $message, $headers);   if ($success) {   echo "The email to $to_name from $from_name was successfully sent"; } else { echo "An error occurred when sending the email to $to_name from $from_name"; } ?>[/code] Regards Huggie
  10. It can be left as ID, so long as it's a unique field, preferably auto-incrementing. Regards Huggie
  11. I'd imagine this is an exchange config issue, not a php issue, however, you could make sure you're using a decent set of headers. Google bought up a lot of results on this topic... [url=http://www.google.co.uk/search?hl=en&q=php+%2Bmail+%2Bexchange+%2Bheaders&meta=&btnG=Google+Search]php +mail +exchange +headers[/url] Regards Rich
  12. You need to get the values into php like so: [code] <?php   $day = $_GET['day']; // The bit inside the single quote is your HTML field name   $month = $_GET['month']; // and the GET would be changed to POST depending on the method you're using   $year = $_GET['year'];   $date = $year . "-" . $month . "-" . $day; // . (dot) is the concatenation symbol ?> [/code] Then just use $date to insert into your date field in the database. Regards Rich
  13. Can you show the full php code for checkcal.php? That would really help. Rich
  14. Surely the first [code=php:0]if (isset($_POST['test']))[/code] should be [code=php:0]if (!isset($_POST['test']))[/code] or am I reading that wrong.  If they tick the box, the value should be null? Rich
  15. SO all the op's are additional columns you can select, and all of the T's are the values for use in the WHERE clause? If so, then just do as suggested, build the query as you go with concatenation. Regards Rich
  16. I'm not sure, it can listen to TCP/UDP ports using sockets, as for physical COM ports, I'm not sure.  What did Google say  ??? Regards Rich
  17. [quote] $_POST["submit"] [/quote] Is that correct?  Double quotes? Regards Rich
  18. gijew, I hate to hijack this thread, but had to mention this quickly... I love the way that your Dev environment looks nothing like your Prod environment.  Now that's good Release Management procedure  ::) he he Huggie
  19. You could use if statements... [code=php:0] $sql = "SELECT col1, col2, col3 FROM table WHERE id"; if (isset($_GET['checkbox1']))(   $sql .= "AND value1 = 'YES'"; } if (isset($_GET['checkbox2']))(   $sql .= "AND value2 = 'YES'"; } $result = mysql_query($sql); [/code] Have you tried something like that? Regards Rich
  20. Good for you, it's nice to see someone who wants to learn but doesn't have time, as opposed to those who have the time, but just can't be arsed! Rich
  21. Do you have an example of it anywhere that I can check it out? Rich
  22. I'm frightened to offer advice now ;) I've been signed up to these forums for about two weeks now, and I could easily do what you've asked, based on the knowledge I've picked up here.  Unfortunately I don't have the time to do it for you with my work commitments, but I'm sure by searching the posts on this forum alone, you'll find what you're looking for. Good luck and I look forward to reading some of your code and helping out if I can. Regards Rich
  23. Yeah, MySQL's not happy there.  Possibly by something that's been entered into the database. If you want to provide the code for just that page, obviously with any passwords taken out, then we'll be happy to take a look for you.  I'm about for the next 30 mins. Regards Rich
  24. Are you including the [b]to:[/b] address anywhere in the headers?  If you are, remove it.  This works well for me: [code]<?php   $from_name = "HuggieBear";   $from_address = "address@domain.com";     $to_name = "ToonMariner";   $to_address = "$to_name <address@domain.com>";     $subject = "Give this a try";   $message = "I last tested this with hotmail.com today and it still works fine.";     $headers .= "MIME-Version: 1.0\r\n";   $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";   $headers .= "From: $from_name <$from_address>\r\n";   $headers .= "Reply-To: $from_name <$from_address>\r\n";   $headers .= "X-Priority: 1\r\n";   $headers .= "X-MSMail-Priority: High\r\n";   $headers .= "X-Mailer: My Test Mailer";   $success = mail($to_address, $subject, $message, $headers);   if ($success) {   echo "The email to $to from $from was successfully sent"; } else { echo "An error occurred when sending the email to $to from $from"; } ?>[/code] Regards Rich
  25. Have I missed something... Are you talking about the PHP Freaks site?  If not, want to provide us with a few more details? Rich
×
×
  • 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.