Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP/MySQL

Status
Not open for further replies.

drawde

Programmer
Sep 7, 2001
5
AU
Hi guys,

I'm a student from the University of Sydney and have been assigned to redesign a faculty website to dynamically generate webpages. The main purpose to creating pages dynamically is to enable staffs to upload a document and make it available to the public on the web page, without the need of adding a static link in the web page by the administrator/webmaster.

I have an idea that PHP/MySQL would be able to solve this problem. But time is short and I have no experience/knowledge in PHP and MySQL. I would much appreciate it if someone could point me to the right direction to get "there" as quickly as possible. Can someone give some pointers as to where I should start and what sort of functions, etc. that I should watch out for?

Thanks guys!

Regards,
Ed
 
create a xxx.php file as:
<?
$dc = mysql_connect(&quot;host&quot;,&quot;user&quot;,&quot;password&quot;)
or die (&quot;Could not connect&quot;);
mysql_select_db(&quot;databaseName&quot;)
or die (&quot;Could not connect&quot;);
$QRETURN = @mysql_query(&quot;select * from x order by a, c&quot;)
or die (&quot;Query failed&quot;);
print &quot;<table>\n&quot;;
$x = 0;
while($line = mysql_fetch_array($QRETURN))
{
$x++;
print &quot; <tr>\n <td>line -- $x\n </td>&quot;;
while(list($col_name, $col_value) = each($line))
{
print &quot; <td>$col_name = $col_value</td>\n&quot;;
}
print &quot; </tr>\n&quot;;
}
print &quot;</table>\n&quot;;
mysql_close($dc);
?>
put this file in an internet shared directory and access it from browser. Ion Filipski
1c.bmp


filipski@excite.com
 
Thanks for that Ion!

If I wanted to create a page for users to upload their documents to the database (for the purpose mentioned before), what sort of forms do you think I should be looking at? Do you reckon Javascript would be possible? Or will the combination of MySQL and PHP do the job as well?

Can you suggest a place where I can look at for more information?

Thanks pal!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top