Peter Rundle wrote:
Yes I was aware of this.G'day Rocci,
I thought I'd throw in my own beginners version of a PHP/mySQL prog.
As you state that your a php beginner I thought that you may not be aware that php can be interspersed within html. Your example could have been written thus;
<HTML><HEAD><TITLE>House Database</TITLE></HEAD> <BODY><H1 align=center>Listing of houses</H1> <HR> <!-- more content, i.e html that's "fixed" -->
<?php $user = "username_with_access_to_the_DB/Table"; $pass = "users_password"; // more php ... ?>
<HR>
<?php printf("Some php variable from above equals:$result\n"); ?>
</BODY></HTML>
I'm not claiming this to be any more "right" than the way you've written it but you might find this a very useful feature of php. (I've heard that there is a perl interpreter that allows perl to be "embedded" within html now too).
HTH
P.
My choice of method was largely due to my php inexperience.
I see now though that in some circumstances it may be more appropriate to use an html file with embedded PHP.
Thanks for bringing that to my attention Peter.
Rocci. -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
