Jump to content

gristoi

Members
  • Posts

    840
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by gristoi

  1. Depends what the site is going to be used for. If it is going to be a fully fledged e commerce site then drupal would be a good bet. If it is just a simple blog style site then have a look at using something like wordpress. Its all down to personal preference, and if you want to build it yourself or not. Even though these packages are proven and tested it never hurts to have a go yourself. This helps to give you a better understanding of the principles involved, i.e design patterns etc.
  2. $res = mysql_query("SELECT * FROM cities", $hd) echo "<form action ='' method='POST'>"; echo "<select>"; while($row = mysql_fetch_array($res)) { echo "<option value='{$row['city_code']}'>{$row['city_name']}</option>";}echo "</select> } echo "</select>"; echo "<input type='submit' name='submitForm' value="Submit"/>"; </form>
  3. $res = mysql_query("SELECT * FROM cities", $hd) echo "<select>"; while($row = mysql_fetch_array($res)) { echo "<option value='{$row['code']}'>{$row['city']}</option>"; } echo "</select>";
  4. where are you declaring your dataString variable ?
  5. this needs to be lower case isset
  6. gristoi

    FCOMMENT?

    FCOMMENT is just an alias name given to the fieldname, it could be called bob for all the difference it would make. Your mysql error is actually telling you that your error is with: t1.*
  7. firstly, what datatype is the relation field ? is it an int, char etc.....
  8. have you added any extra queries to the site in the last week, could be a memory leak caused by your sql. have a look at setting up the mysql slow query logs and see if that's causing an issue?
  9. your code is doing exactly what it is coded to do. What is the problem?
  10. Which column does the variable relate to?, for example if it related to the Mobile column: SELECT Business_Name,First_Name,Last_Name,Username,Email,Phone,Mobile,Social_Media,Web_Site,User_Language,Admin_Level FROM customer WHERE Mobile = '$variable'
  11. Instead of passing the datetime and then running another function to reformat, try using the Date_format(mydateField, 'd/m/Y H:i:s') Within your query. The main reason you use a datetime in mysql is that it has an enormous array of functions that can be run against it, one of them Being formatting.
  12. damn extra speech mark. gets me every time.
  13. well spotted lol
  14. 1. does the image exist on the server / your pc. 2. is the images folder sitting in the same directory as this test script. 3. you could try and see if the file exists: if (file_exists("images/bottlesandcaps/diamondbottles/smalldiamonddarkblue.gif")) { echo"image exists!"; } else { echo"image does not exist!"; }
  15. Sorry, i thought it wouldnt be a great leap for him to follow the syntax: $string = '74342'; $newstring=substr_replace($string, '.', -2, 0); echo $newstring; // result = 743.42
  16. looks like your trying to upload your code files into your database, not your sql dump.
  17. $newstring=substr_replace($orig_string, $insert_string, $position, 0);
  18. if you are using windows however it will more than likely be: c:/xammp/htdocs/
  19. You cant execute or call php functions directly from within an sql statement
  20. why are you trying to import html direct into the database?
  21. SELECT * FROM table WHERE field1 + field2 = '3'" given that field 1 and 2 where both INT fields
  22. I have always found this to be a really good and easy reference to get you started: http://www.abbeyworkshop.com/howto/misc/svn01/
  23. you should look at using a code source reporitory. such as subversion, cvs or git
  24. $date=date("Y-m-d H:i:s",time() + 7200);
  25. <?php // connect to the database include('connect-db.php'); // get id value $id = $_GET['id']; echo "$id"; $sql="SELECT * FROM events WHERE type='beacon'"; $result=mysql_query($sql); $active=($result['publish']=='')?'Yes':'No'; echo "$active"; if ($active='Yes') { $active='No'; } else { $active='Yes'; } $sqltwo = "UPDATE events SET publish='$active' WHERE ID='$id'"; $resulttwo = mysql_query($sqltwo); // header("Location: beacon.php"); ?>
×
×
  • 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.