Det kan godt være at det bare er mig den er gal med...
men det tror jeg ikke...
her er poblemet(koden er inklusiv linie nr.)
Parse error: parse error, expecting `','' or `';'' in :\\apache\\htdocs\\thesymbol\\game\\chat\\create.php on line 40
24 <?php
25 if ($room="null"){
26 echo"<FORM ACTION='$php_self?user=$user' METHOD='post'>\\n";
27 echo"Type chatroom name ";
28 echo"<INPUT TYPE='text' MAXLENGTH='20' Name='roomname' SIZE='20'>\\n";
29 echo"Type chatroom Discription ";
30 echo"<INPUT TYPE='text' MAXLENGTH='255' Name='roomtext' SIZE='40'>\\n";
31 echo"Type chatroom max users ";
32 echo"<INPUT TYPE='text' MAXLENGTH='3' Name='maxuser' SIZE='3'>\\n";
33 echo"Type chatroom Creator ";
34 echo"<INPUT TYPE='text' MAXLENGTH='20' VALUE='Guest' Name='user' SIZE='20'>\\n";
35 echo"<INPUT TYPE='submit' VALUE='Submit' NAME='submit'>\\n";
36 echo"</FORM>";
37 } else {
38 echo"You have allready created one chatroom.";
39 }
40 $dblink = mysql_connect("localhost","techsider","");
41 if(!$dblink) {print("Connection to MySql failed");
42 exit;}
43 $success = mysql_select_db("thesymbol",$dblink);
44 if (!$success) {print("Connection to the database failed");
45 exit;}
46 if ($submit == "Submit") {
47 $sql = "INSERT INTO game_chat_room SET
48 roomname='$roomname',
49 roomtext='$roomtext',
50 maxuser='$maxuser'
51 creator='$user';
52 if (!@mysql_query($sql)) {echo("There was an error in the creation of your chatroom.");
53 }
54 }
55 ?>
Mvh Ralph B. Andreasen
Hvorfor den lige siger linie 40 kan jeg ikke gennemskue, men du mangler en " i slutningen af linie 51 (og et , i slutningen af 50, men det giver først bøvl når du forsøger at udføre dit SQL statement)
/data