Jump to content

AndyB

Staff Alumni
  • Posts

    5,465
  • Joined

  • Last visited

    Never

Everything posted by AndyB

  1. Does it help to know that the date() function allows you to find the day of the year (starting from zero)?
  2. It's helpful to go beyond "didn't work" in your posts. What happened that you didn't expect? What didn't happen that you did expect? What did you see/not see? What error messages did you see? And so on ... For starters, don't use hyphens in variable names as they're interpreted as subtraction operators. If you want easy-reading variable names, use underscore.
  3. maybe it's time to do some light reading - http://www.tizag.com/mysqlTutorial/
  4. $petname = $_POST['name']; $pettype = $_POST['type']; $petprice = $_POST['petprice']; $host="localhost"; $user="root"; $pass="majick"; mysql_connect ($host, $user, $pass) or die ('some error message'); mysql_select_db("pet"); $result = mysql_query("INSERT INTO animal (name, type, price) VALUES ('$petname', '$pettype', '$petprice')"); mysql_query or die ('Error updating database');
  5. And did you read (or try) the suggestion I made about using the file() function?
  6. file() reads the contents into an array - http://ca.php.net/manual/en/function.file.php Then echo each array element between paragraph tags.
  7. What exactly are you trying to do? Maybe Barand can divine your intentions, but I can't and I suspect not many other readers would understand your last post.
  8. I couldn't explain it better than the manual and the user notes/examples on the same page. Specifically, what's the problem you're having with the function?
  9. It's not an error; it's a notice, i.e. a warning that your code is insufficient for the error_reporting setting you cose (or exists on your server). Define $id before you assign a value to it and the notice will evaporate.
  10. Take a look at string padding in the manual - http://ca.php.net/manual/en/function.str-pad.php
  11. AndyB

    input as image

    I suspect that your problem lies with register1.php. Maybe you want to post some of that.
  12. What's overflowing from where to where ... and what browser is that happening with (because I see no overflow with IE6 or FF2)?
  13. google - image map menu fx: http://www.cssplay.co.uk/menu/mantis.html - enjoy
  14. add 1900 or 2000 depending on the 'date'
  15. On a talk radio show yesterday ... "Supposing the experiments prove that God didn't make the world in seven days?" That got right to the heart of the principal problem with science - it deals in reality.
  16. Two clicks! some needle in a haystack!!
  17. stunning
  18. edit this: $contact_details .= '<tr class="c1"> '. ' <td align="right">' . MSG_FULL_NAME . '</td> '. ' <td>' . $user_details['name'] . '</td> '. '</tr> '. '<tr class="c1"> '. ' <td align="right">' . MSG_FULL_ADDRESS . '</td> '. ' <td>' . $user->full_address($user_details) . '</td> '. '</tr> '; to this: $contact_details .= '<tr class="c1"> '. ' <td align="right">' . MSG_FULL_NAME . '</td> '. ' <td>' . $user_details['name'] . '</td> '. '</tr> ';
  19. INSERT does not support WHERE. Insert adds to the table. If you properly trapped and displayed errors, you would have seen that.
  20. FYI, now it works (as expected) with FF2 and IE6
  21. Looking at it with either Firefox2 or IE6 on a PC, it's hard to reconcile your problem description with what I see.
  22. http://ca.php.net/manual/en/function.rand.php - and the first line is ... rand — Generate a random integer For your example, try $rand = 0.1*rand(1,5) instead
  23. "the field is not valid" is not a useful error mesage of any sort. It's impossible for anyone to tell you waht's wrong, let alone how it might be fixed. Did you write ALL the code or is this a packaged script you customized?
  24. Crikey! There's so much wrong that the best thing to do would be for you to read a simple tutorial before attempting anything else. A good starting page is http://www.tizag.com/mysqlTutorial/mysqlselect.php
  25. slight nitpick - the word is résumé - both e's accented.
×
×
  • 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.