Jump to content

Odaku128

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Everything posted by Odaku128

  1. Hello there, Im having a problem with the following sql statement. SELECT * FROM property_list LEFT JOIN photo_list ON property_list.Property_ID = photo_list.Property_ID WHERE Main_Pic = '1' The above statement works. It retrieves a property and only the main picture of that property. I want to add another WHERE statement to select a property by its id, so it looks something like this. SELECT * FROM property_list LEFT JOIN photo_list ON property_list.Property_ID = photo_list.Property_ID WHERE Main_Pic = '1' AND Property_ID = $propertyid What is the correct way to go about doing this? Thanks in advance. Phil
  2. Does anyone know how the bg_color option of imagerotate (GD Library) works. Set to 0, you get the black background. But after experimenting i can find no logic. 988988988 creates a mustard yellow -255255255 creates a red 1111 is a blue There must be a logical way of using this. Help?
  3. Thanks premiso
  4. If i then send it to another page how can i get it to echo all the empty values there? <?php foreach($_POST as $key => $val) { if(empty($val)) { $errors .= "$key is empty<br />"; session_start(); $_SESSION['Form Errors'] = "$errors"; Header('Location: ../somewhere.php'); exit; session_destroy(); } }
  5. Hi, I need help with the following code: <?php foreach($_POST as $key => $val) { if(empty($val)) { $errors .= "$key is empty<br />"; echo $errors; exit; } } My form posts several keys and this code is to check if the values are empty. $errors is supposed to echo all empty values but at present will only echo the first empty value it come across. What have i done wrong?
×
×
  • 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.