Hi,
I'm planning on using a script like this to display a table from my database.
What I want to know is do I simply change the permissions so the file is executable only? I don't want them to be able to read the code of the php file, but they must be able to read what it outputs.
If it is the permission settings what permissions should I use in this case?
thx all help is appreciated
Code:<?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); $result = mysql_query("SELECT * FROM Persons"); echo "<table border='1'> <tr> <th>Firstname</th> <th>Lastname</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['FirstName'] . "</td>"; echo "<td>" . $row['LastName'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?>




Reply With Quote