> Thanks, now it seems clear how to go about doing this integration with php
> thingy.
Yeah, it's gear. (anyone remember _that_ term?)
> Now, things are clearer about what gets executed on the server and what
> gets filtered to the browser (client side).
Anything that you can type by hand or generate with FrontPage, DreamWeaver,
etc... to be published as a page can be generated with PHP. You can mix the
two with no problems whatsoever. It's actually pretty common to generate
JavaScript with PHP, for instance, JS drop down menus and stuff like that,
where the menuitems are different based on the state of the user's session
thus far.
> The other thing I would have to do is, allow the user to enter
> information in a custom broswer, and pass that information into mysql.
To do this, you'd really have to send data back to the webserver -- PHP's
job is done before the client ever sees the page. It creates the page and
then sends it to the client. So if you want the client to be able to modify
your database, you're probably looking at using forms to submit information
back to the site.
> Would you be able to give soem simple examples?
Here's a quick example:
--- test.php ---
<HTML>
<HEAD>
<TITLE>Simple Example</TITLE>
</HEAD>
<BODY>
<?php
/* First time here, the username will not be set. */
if (isset($username))
{
echo "Yo, $username";
/* You can insert into the DB here. */
$db = mysql_connect(bla bla);
$query = "insert users bla bla bla";
mysql_query($query);
}
else
{
/* Form will post data back to this same file.
*/
/* Note that the textfield input sets a variable called 'username'
*/
echo ' <FORM ACTION="test.php" METHOD="POST">' .
"\n";
echo ' <INPUT TYPE="textfield" SIZE="20" NAME="username">' .
"\n";
echo ' <INPUT TYPE="submit" value="HIT ME, SUCKA!">' .
"\n";
echo ' </FORM>' .
"\n";
}
?>
</BODY>
</HTML>
> Thanks again
Anytime, I know this is really trivial... but it just illustrates the point
that PHP can only do something between the time a user requests to access a
page from the server, and the server dishes it out.
Take care,
Nik