Saved Bookmarks
| 1. |
Solve : PHP question? |
|
Answer» HEY, it's been a while since I've been here. I've been very busy. 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. Code: [Select]<?php $link='../../pr0t3ct3d/math/'; $link1=$link.'stats1.jpg'; $text1='Chapter13-1'; $link2=$link.'stats20-22.doc'; $text2='Graphing-Chi-Square/LinearRegression'; if($_SESSION['login']==1) { echo"<fontsize=\"+2\">Statistics</font><br/>"; fopen('$link1','r'); echo"<br/>"; fopen('$link2','r'); } else { echo"LoginCredentialsincorrect.Pleasetryagain."; } ?> Does anyone know 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?ask http://phpbuilder.com/board/ they have tons of knowledgeable users that can help more with php/mysql stuff |
|