11. april 2001 - 22:34Der er
26 kommentarer og 1 løsning
Parse error som måske ikke findes?!:(
<html><title>The WZCyber-Shop</title> <body bgcolor=\"153580\" text=#FFFFFF link=\"#000000\" vlink=\"#CCCCCC\"> <div align=\"center\"> <pre> <font size=\"5\">Velkommen til WZCyber-Shoppen</font> </pre> </div> <div align=\"center\"> <pre> På denne side kan du købe en masse cyber ting! ;o)</pre> </div>
<? if( $HTTP_POST_VARS[nick] && $HTTP_POST_VARS[pass]) { require(\"config.php\"); mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); mysql_query(\"update userlogin set $HTTP_POST_VARS[plads] = \'$HTTP_POST_VARS[ting]\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); mysql_close(); if ($HTTP_POST_VARS[ting] == \"Bil\") { $pris = 5000; mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); $res2 = mysql_query(\"SELECT wz_kr FROM userlogin WHERE nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); while ($row = mysql_fetch_array($res2)) { if ($row[wz_kr] > \"$pris\" ) { $regn = $row[wz_kr] - $pris; mysql_query(\"update userlogin set wz_kr = \'$regn\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); $msg = \"du har nu købt en bil til $pris\" ; } } elseif ($row[wz_kr] < \"$pris\" ) { $msg = \"Sorry du har ikke råd! :o(\"; } } mysql_close(); } } if($msg) echo $msg; ?> <form action=\"setup.php\" method=post enctype=\"multipart/form-data\"> <pre><table width=\"100%\" border=\"0\"> <tr> <td width=\"67%\">Skriv dit nick her</td> <td width=\"33%\"> <input type=text size=16 name=nick maxlength=16 value=\"\"> </td> </tr> <tr> <td width=\"67%\">Skriv din kode her:</td> <td width=\"33%\"> <input type=text size=16 name=pass maxlength=16> </td> </tr> <tr> <td width=\"67%\">Hvor vil du have din ting opbevaret henne?:</td> <td width=\"33%\"> <select name=\"plads\"> <option value=\"ting1\">Første ting</option> <option value=\"ting2\">Anden ting</option> <option value=\"ting3\">Tredje ting</option> <option value=\"ting4\">Fjerde ting</option> <option value=\"ting5\">Femte ting</option> </select> </td> </tr> <tr> <td width=\"67%\">Hvad vil du have?:</td> <td width=\"33%\"> <select name=\"ting\"> <option value=\"Bil\">En bil til 5000,-</option> </select> </td> </tr> </table><input type=submit value=\"Køb\" name=\"submit\"></pre> </form> </body></html> </body> </html>
Jeg får af en eller anden sær grund en error på linie 30...jeg fatter ikke hvorfor..nogen der kan hjælpe?!
<html><title>The WZCyber-Shop</title> <body bgcolor=\"153580\" text=#FFFFFF link=\"#000000\" vlink=\"#CCCCCC\"> <div align=\"center\"> <pre> <font size=\"5\">Velkommen til WZCyber-Shoppen</font> </pre> </div> <div align=\"center\"> <pre> På denne side kan du købe en masse cyber ting! ;o)</pre> </div>
<? if( $HTTP_POST_VARS[nick] && $HTTP_POST_VARS[pass]) { require(\"config.php\"); mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); mysql_query(\"update userlogin set $HTTP_POST_VARS[plads] = \'$HTTP_POST_VARS[ting]\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); mysql_close(); if ($HTTP_POST_VARS[ting] == \"Bil\") { $pris = 5000; mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); $res2 = mysql_query(\"SELECT wz_kr FROM userlogin WHERE nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); while ($row = mysql_fetch_array($res2)) { if ($row[\"wz_kr\"] > $pris ) { $regn = $row[\"wz_kr\"] - $pris; mysql_query(\"update userlogin set wz_kr = \'$regn\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); $msg = \"du har nu købt en bil til $pris\" ; } } elseif ($row[wz_kr] < $pris ) { $msg = \"Sorry du har ikke råd! :o(\"; } } mysql_close(); } } if($msg) echo $msg; ?> <form action=\"setup.php\" method=post enctype=\"multipart/form-data\"> <pre><table width=\"100%\" border=\"0\"> <tr> <td width=\"67%\">Skriv dit nick her</td> <td width=\"33%\"> <input type=text size=16 name=nick maxlength=16 value=\"\"> </td> </tr> <tr> <td width=\"67%\">Skriv din kode her:</td> <td width=\"33%\"> <input type=text size=16 name=pass maxlength=16> </td> </tr> <tr> <td width=\"67%\">Hvor vil du have din ting opbevaret henne?:</td> <td width=\"33%\"> <select name=\"plads\"> <option value=\"ting1\">Første ting</option> <option value=\"ting2\">Anden ting</option> <option value=\"ting3\">Tredje ting</option> <option value=\"ting4\">Fjerde ting</option> <option value=\"ting5\">Femte ting</option> </select> </td> </tr> <tr> <td width=\"67%\">Hvad vil du have?:</td> <td width=\"33%\"> <select name=\"ting\"> <option value=\"Bil\">En bil til 5000,-</option> </select> </td> </tr> </table><input type=submit value=\"Køb\" name=\"submit\"></pre> </form> </body></html> </body> </html>
hmm..det virker altså endnu ikke..se mit script nu..->
<html><title>The WZCyber-Shop</title><HEAD> <body bgcolor=\"153580\" text=#FFFFFF link=\"#000000\" vlink=\"#CCCCCC\"> <div align=\"center\"> <pre> <font size=\"5\">Velkommen til WZCyber-Shoppen</font> </pre> </div> <div align=\"center\"> <pre> På denne side kan du købe en masse cyber ting! ;o)</pre> </div>
<? if( $HTTP_POST_VARS[nick] && $HTTP_POST_VARS[pass]) { require(\"config.php\"); mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); mysql_query(\"update userlogin set $HTTP_POST_VARS[plads] = \'$HTTP_POST_VARS[ting]\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); mysql_close(); if ($HTTP_POST_VARS[ting] == \"Bil\") { $pris = 5000; mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); $res2 = mysql_query(\"SELECT wz_kr FROM userlogin WHERE nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); while ($row = mysql_fetch_array($res2)) { if ($row[wz_kr] > \"$pris\" ) { $regn = $row[wz_kr] - $pris; mysql_query(\"update userlogin set wz_kr = \'$regn\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); $msg = \"du har nu købt en bil til $pris\" ; } } elseif ($row[\"wz_kr\"] < $pris ) { $msg = \"Sorry du har ikke råd! :o(\"; } } mysql_close(); } } if($msg) echo $msg; ?> <form action=\"setup.php\" method=post enctype=\"multipart/form-data\"> <pre><table width=\"100%\" border=\"0\"> <tr> <td width=\"67%\">Skriv dit nick her</td> <td width=\"33%\"> <input type=text size=16 name=nick maxlength=16 value=\"\"> </td> </tr> <tr> <td width=\"67%\">Skriv din kode her:</td> <td width=\"33%\"> <input type=text size=16 name=pass maxlength=16> </td> </tr> <tr> <td width=\"67%\">Hvor vil du have din ting opbevaret henne?:</td> <td width=\"33%\"> <select name=\"plads\"> <option value=\"ting1\">Første ting</option> <option value=\"ting2\">Anden ting</option> <option value=\"ting3\">Tredje ting</option> <option value=\"ting4\">Fjerde ting</option> <option value=\"ting5\">Femte ting</option> </select> </td> </tr> <tr> <td width=\"67%\">Hvad vil du have?:</td> <td width=\"33%\"> <select name=\"ting\"> <option value=\"Bil\">En bil til 5000,-</option> </select> </td> </tr> </table><input type=submit value=\"Køb\" name=\"submit\"></pre> </form> </body></html> </body> </html>
Prøv med denne (der er en } for meget i linie 30):
<html><title>The WZCyber-Shop</title><HEAD> <body bgcolor=\"153580\" text=#FFFFFF link=\"#000000\" vlink=\"#CCCCCC\"> <div align=\"center\"> <pre> <font size=\"5\">Velkommen til WZCyber-Shoppen</font> </pre> </div> <div align=\"center\"> <pre> På denne side kan du købe en masse cyber ting! ;o)</pre> </div>
<? if ($HTTP_POST_VARS[nick] && $HTTP_POST_VARS[pass]){ require(\"config.php\"); mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); mysql_query(\"update userlogin set $HTTP_POST_VARS[plads] = \'$HTTP_POST_VARS[ting]\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); mysql_close(); if ($HTTP_POST_VARS[ting] == \"Bil\") { $pris = 5000; mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); $res2 = mysql_query(\"SELECT wz_kr FROM userlogin WHERE nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); while ($row = mysql_fetch_array($res2)) { if ($row[wz_kr] > \"$pris\" ) { $regn = $row[wz_kr] - $pris; mysql_query(\"update userlogin set wz_kr = \'$regn\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); $msg = \"du har nu købt en bil til $pris\" ; }elseif ($row[\"wz_kr\"] < $pris ) { $msg = \"Sorry du har ikke råd! :o(\"; } } mysql_close(); } } if($msg) echo $msg; ?> <form action=\"setup.php\" method=post enctype=\"multipart/form-data\"> <pre><table width=\"100%\" border=\"0\"> <tr> <td width=\"67%\">Skriv dit nick her</td> <td width=\"33%\"> <input type=text size=16 name=nick maxlength=16 value=\"\"> </td> </tr> <tr> <td width=\"67%\">Skriv din kode her:</td> <td width=\"33%\"> <input type=text size=16 name=pass maxlength=16> </td> </tr> <tr> <td width=\"67%\">Hvor vil du have din ting opbevaret henne?:</td> <td width=\"33%\"> <select name=\"plads\"> <option value=\"ting1\">Første ting</option> <option value=\"ting2\">Anden ting</option> <option value=\"ting3\">Tredje ting</option> <option value=\"ting4\">Fjerde ting</option> <option value=\"ting5\">Femte ting</option> </select> </td> </tr> <tr> <td width=\"67%\">Hvad vil du have?:</td> <td width=\"33%\"> <select name=\"ting\"> <option value=\"Bil\">En bil til 5000,-</option> </select> </td> </tr> </table><input type=submit value=\"Køb\" name=\"submit\"></pre> </form> </body></html> </body> </html>
<body bgcolor=\"153580\" text=#FFFFFF link=\"#000000\" vlink=\"#CCCCCC\"> <div align=\"center\"><pre> <font size=\"5\">Velkommen til WZCyber-Shoppen</font></pre></div>
<div align=\"center\"><pre> På denne side kan du købe en masse cyber ting! ;o)</pre></div>
<? if ($HTTP_POST_VARS[\"nick\"] && $HTTP_POST_VARS[\"pass\"]) { require(\"config.php\"); mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); mysql_query(\"update userlogin set $HTTP_POST_VARS[plads] = \'$HTTP_POST_VARS[ting]\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); // kan ikke lige se hvad denner til for med mindre den skal bruges som en if saetning... if ($HTTP_POST_VARS[\"ting\"] == \"Bil\") { $pris = 5000; $res2 = mysql_query(\"SELECT wz_kr FROM userlogin WHERE nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); while ($row = mysql_fetch_array($res2)) { if ($row[\"wz_kr\"] > $pris ) { $regn = $row[\"wz_kr\"] - $pris; mysql_query(\"update userlogin set wz_kr = \'$regn\' where nick = \'$HTTP_POST_VARS[nick]\' AND pass = \'$HTTP_POST_VARS[pass]\'\"); $msg = \"du har nu købt en bil til $pris\" ; } } elseif ($row[\"wz_kr\"] < $pris) { $msg = \"Sorry du har ikke råd! :o(\"; } } mysql_close(); }
if ($msg) echo $msg; ?> <form action=\"setup.php\" method=post enctype=\"multipart/form-data\"> <pre><table width=\"100%\" border=\"0\"> <tr> <td width=\"67%\">Skriv dit nick her</td> <td width=\"33%\"> <input type=text size=16 name=nick maxlength=16 value=\"\"> </td> </tr> <tr> <td width=\"67%\">Skriv din kode her:</td> <td width=\"33%\"> <input type=text size=16 name=pass maxlength=16> </td> </tr> <tr> <td width=\"67%\">Hvor vil du have din ting opbevaret henne?:</td> <td width=\"33%\"> <select name=\"plads\"> <option value=\"ting1\">Første ting</option> <option value=\"ting2\">Anden ting</option> <option value=\"ting3\">Tredje ting</option> <option value=\"ting4\">Fjerde ting</option> <option value=\"ting5\">Femte ting</option> </select> </td> </tr> <tr> <td width=\"67%\">Hvad vil du have?:</td> <td width=\"33%\"> <select name=\"ting\"> <option value=\"Bil\">En bil til 5000,-</option> </select> </td> </tr> </table><input type=submit value=\"Køb\" name=\"submit\"></pre> </form> </body> </html>
<body bgcolor=\"153580\" text=#FFFFFF link=\"#000000\" vlink=\"#CCCCCC\"> <div align=\"center\"><pre> <font size=\"5\">Velkommen til WZCyber-Shoppen</font></pre></div>
<div align=\"center\"><pre> På denne side kan du købe en masse cyber ting! ;o)</pre></div>
<? if ($HTTP_POST_VARS[\"nick\"] && $HTTP_POST_VARS[\"pass\"]) { require(\"config.php\"); mysql_connect($dbhost, $dbuser, $dbpass); mysql_select_db($database); mysql_query(\"update userlogin set {$HTTP_POST_VARS[\"plads\"]} = \'{$HTTP_POST_VARS[\"ting\"]}\' where nick = \'{$HTTP_POST_VARS[\"nick\"]}\' AND pass = \'{$HTTP_POST_VARS[\"pass\"]}\'\"); if ($HTTP_POST_VARS[\"ting\"] == \"Bil\") { $pris = 5000; $res2 = mysql_query(\"SELECT wz_kr FROM userlogin WHERE nick = \'{$HTTP_POST_VARS[\"nick\"]}\' AND pass = \'{$HTTP_POST_VARS[\"pass\"]}\'\"); while ($row = mysql_fetch_array($res2)) { if ($row[\"wz_kr\"] > $pris ) { $regn = $row[\"wz_kr\"] - $pris; mysql_query(\"update userlogin set wz_kr = \'$regn\' where nick = \'{$HTTP_POST_VARS[\"nick\"]}\' AND pass = \'{$HTTP_POST_VARS[\"pass\"]}\'\"); $msg = \"du har nu købt en bil til $pris\" ; } } elseif ($row[\"wz_kr\"] < $pris) { $msg = \"Sorry du har ikke råd! :o(\"; } } mysql_close(); }
if isset($msg) echo $msg; ?> <form action=\"setup.php\" method=post enctype=\"multipart/form-data\"> <pre><table width=\"100%\" border=\"0\"> <tr> <td width=\"67%\">Skriv dit nick her</td> <td width=\"33%\"> <input type=text size=16 name=nick maxlength=16 value=\"\"> </td> </tr> <tr> <td width=\"67%\">Skriv din kode her:</td> <td width=\"33%\"> <input type=text size=16 name=pass maxlength=16> </td> </tr> <tr> <td width=\"67%\">Hvor vil du have din ting opbevaret henne?:</td> <td width=\"33%\"> <select name=\"plads\"> <option value=\"ting1\">Første ting</option> <option value=\"ting2\">Anden ting</option> <option value=\"ting3\">Tredje ting</option> <option value=\"ting4\">Fjerde ting</option> <option value=\"ting5\">Femte ting</option> </select> </td> </tr> <tr> <td width=\"67%\">Hvad vil du have?:</td> <td width=\"33%\"> <select name=\"ting\"> <option value=\"Bil\">En bil til 5000,-</option> </select> </td> </tr> </table><input type=submit value=\"Køb\" name=\"submit\"></pre> </form> </body> </html>
Ved ikke lige om min løsning med MySQL og arrays passer, men kunne ikke finde noget i manualen, jeg har dog rettet en bunke andre fejl i både HTML og PHP.
Ja! ;o) Den virker som den skal!...TAKKER MANGE GANGE!........ *HADER DE FUCKING PARSE ERRORS* :(
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.