Where do I get a free webhost with PHP & MySQL?
Of course I'd prefer PHP 4+.. hehe, but nonetheless.. and also shell access (is that what u call it?) would be very nice!
I have actualy found one: jumpworld.net but there seems to be something wrong there. first, theres no shell access. then, accounts created are very confusing. third, a tutorial script from webmonkey doesnt work there.
initially, i actually have to write up a script to create a table in a database, which has to be created thriough its controlpanel, which subsequently is automatically named userid_dbName. the script connects to the mysql server and then created the table. i would like a shell session so that i can actually check what tables i have! or can i use something like tableinfo(); in the script?
then after inputing bout 5 employee entries, in the employee table, printf-ing the results return:
line 34, invalid argument, not valid $result resource
or something like that. i guess i understand what that means..where im actually using a wrong syntax. see, i don't know heck about php nor the result object is it an object at all? i know java, not php.
i need all this just to self-tutor myself.
thanks a lot.
ps(if you can help me with my error statement and such, please do so! ill really appreciate that)
Mark Hensler posted this at 06:08 — 13th September 2000.
He has: 4,048 posts
Joined: Aug 2000
post the code...
Then I can decifer it.
my guess is that you are using $result wrong (duh, huh?)
You need to use it like:
$query = "SELECT * FROM tablename";
$result = mysql_query ($query);
if (!$result)
die ("Query Error");
while ($MyStuff = mysql_fetch_array ($result)) {
print $MyStuff["fieldname"];
}
There are several different ways to print data from the $result. This is just one of them (probably not the one you need either). Anyway, if you can, post the code.
Mark Hensler
If there is no answer on Google, then there is no question.
Nightspirit posted this at 12:42 — 14th September 2000.
They have: 36 posts
Joined: Jun 2000
hey man.
yeah i guess it was bad programming on my part. im still trying to grasp most of the basics of PHP and mySQL.
thanks anyway.
-= Edit =-
Urr...what the hell is a DIE statement?
[Edited by Nightspirit on 09-14-2000 at 08:46 AM]
Mark Hensler posted this at 23:49 — 14th September 2000.
He has: 4,048 posts
Joined: Aug 2000
if (!$this)
die("\$this doesn't exist");
this will evaluate (see if $this doesn't exist). If $this doesn't exist, it returns true, and executes the next statement (the next line here).
The die() functoin simply prints the ("string") and kills (stops) the script.
Mark Hensler
If there is no answer on Google, then there is no question.
gokhan posted this at 07:29 — 15th September 2000.
They have: 3 posts
Joined: Sep 2000
you should start reading abour perl a little, because die/warn is one of debugging tools. Do you know what is strict?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.