Hi, new to these boards...
I'm trying to finish off a site that has been using hybrid HTML and PHP, and I have one final problem.
I need to set up a list of links that a user can click to download the correct file. Here's the code I've been trying out, but I know fopen() is wrong since it tries to instantly open the file instead of waiting for a click.
<?php
$link = '../../pr0t3ct3d/math/';
$link1 = $link . 'stats1.jpg';
$text1 = 'Chapter 13 - 1';
$link2 = $link . 'stats 20-22.doc';
$text2 = 'Graphing - Chi-Square/Linear Regression';
if($_SESSION['login'] == 1)
{
echo "<font size=\"+2\">Statistics</font><br />";
fopen('$link1','r');
echo "<br />";
fopen('$link2','r');
}
else
{
echo "Login Credentials incorrect. Please try again.";
}
?>
What is the correct command to use so that I can include my own link titles ($text1, $text2) and link to those different links ($link1, $link2)?
Finally, I think the link is incorrect since fopen() is still returning errors about not being able to find the documents. /pr0t3ct3d/ is on the lowest possible level, how do I get to it correctly?