Hy! I'm using Wamp server, it's great, but I have a big problem: my SQL database exists, I can see it with PHPMyadmin or with any other mysql manager (with the same user and no password, as you can see bellow), I don't have password on it, the data is OK, but....the PHP code can't connect to this database. There's no error messege, the browser prints the PHP code, without connecting to my database! Please, can anyoane help me?? Nearby I send my code:
<a href="posta.html"> Inapoi la pagina principala </a>
<br><br>
<?
mysql_pconnect("localhost","root",""
;
mysql_select_db("posta"
;
$sql="select * from firme ORDER BY cod asc";
$resursa=mysql_query($sql);
print "<table border='1'>";
while ($row=mysql_fetch_array($resursa))
{print "<tr>
<td> ".$row['cod']." </td>
<td> ".$row['numefirma']." </td>
<td> ".$row['telefon']." </td>
<td> ".$row['str']." </td>
<td> ".$row['nr']." </td>
<td> ".$row['bloc']." </td>
<td> ".$row['sc']." </td>
<td> ".$row['et']." </td>
<td> ".$row['ap']." </td>
<td> ".$row['codp']." </td>
<td> ".$row['loc']." </td>
<td> ".$row['jud']." </td>
</tr>";}
print "</table>";
?>
<br><br>
<a href="posta.html"> Inapoi la pagina principala </a>
If I run this script in browser, the answer is:
<td> ".$row['cod']." </td>
<td> ".$row['numefirma']." </td>
<td> ".$row['telefon']." </td>
<td> ".$row['str']." </td>
<td> ".$row['nr']." </td>
<td> ".$row['bloc']." </td>
<td> ".$row['sc']." </td>
<td> ".$row['et']." </td>
<td> ".$row['ap']." </td>
<td> ".$row['codp']." </td>
<td> ".$row['loc']." </td>
<td> ".$row['jud']." </td>
</tr>";}
print "</table>";
?>
What's wrong?? Please, help!! Thanks, Monica