
AndyB
Staff Alumni-
Posts
5,465 -
Joined
-
Last visited
Never
Everything posted by AndyB
-
Does it help to know that the date() function allows you to find the day of the year (starting from zero)?
-
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.
-
maybe it's time to do some light reading - http://www.tizag.com/mysqlTutorial/
-
$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');
-
And did you read (or try) the suggestion I made about using the file() function?
-
file() reads the contents into an array - http://ca.php.net/manual/en/function.file.php Then echo each array element between paragraph tags.
-
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.
-
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?
-
[SOLVED] $id = $_GET['id'] - can't get it to work :(
AndyB replied to selliott's topic in Microsoft SQL - MSSQL
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. -
Take a look at string padding in the manual - http://ca.php.net/manual/en/function.str-pad.php
-
I suspect that your problem lies with register1.php. Maybe you want to post some of that.
-
What's overflowing from where to where ... and what browser is that happening with (because I see no overflow with IE6 or FF2)?
-
google - image map menu fx: http://www.cssplay.co.uk/menu/mantis.html - enjoy
-
[SOLVED] Convert a 2 digit year to a 4 digit year
AndyB replied to 2levelsabove's topic in PHP Coding Help
add 1900 or 2000 depending on the 'date' -
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.
-
Legal issues with linking to google maps!My Boss is driving me mad!
AndyB replied to scotchegg78's topic in Miscellaneous
Two clicks! some needle in a haystack!! -
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> ';
-
INSERT does not support WHERE. Insert adds to the table. If you properly trapped and displayed errors, you would have seen that.
-
FYI, now it works (as expected) with FF2 and IE6
-
Looking at it with either Firefox2 or IE6 on a PC, it's hard to reconcile your problem description with what I see.
-
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
-
"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?
-
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
-
slight nitpick - the word is résumé - both e's accented.