Syntax error

It says that I have 3 syntax errors at lines 17, 21 and 24, but I don’t really understand what did I do wrong, even though I checked thousand of times. If anyone could help me, I’d gladly appreciate it. Thanks in advance.
[php]

Tutorial Tutorial
<?php $nume=$_POST["nume"]; $con=mysql_connect("localhost","root",""); mysql_select_db("tutoriale,$con); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; $result=mysql_query("SELECT * FROM tutoriale WHERE Nume='$nume'"); while($row=mysql_fetch_array($result)) { echo ''; echo ''; echo ''; echo ''; echo ''; } echo '
'; echo "Nume";echo ''; echo "Grad de dificultate";echo ''; echo "Număr pași";echo '
'; echo $row['Nume'];echo ''; echo $row['Grad de dificultate'];echo ''; echo $row['Număr pași'];echo '
'; ?> [/php]

first one is on mysql_select_db("tutoriale,$con);, forgot the end quote, and that looks to be the only one that I can see.

this can be changed to

echo ‘<table border="3’ align=“center”>

Nume Grad de dificultate Număr pași ';

The while loop can be changed to

while($row=mysql_fetch_array($result)) {
echo ’

$row[Nume] $row[Grad de dificultate] $row[Număr pași] '; } echo '';

The only other thing I see is that I don’t you can have spaces in your table column names

put it all together, and you get
[php]

Tutorial
Tutorial

<?php $nume=mysql_real_escape_string($_POST["nume"]); $con=mysql_connect("localhost","root",""); mysql_select_db("tutoriale",$con);

echo ’

'; $result=mysql_query("SELECT * FROM tutoriale WHERE Nume='$nume'"); while($row=mysql_fetch_array($result)) { echo ''; } echo '
Nume Grad de dificultate Număr pași
$row[Nume] $row[Grad_de_dificultate] $row[Număr_pași]
'; ?> [/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service