Jump to content

Problems with GET


Anykey

Recommended Posts

Hello,

 

I've scripted a program in combination from php an html.

It's a program for school where people can insert their name an projects they would like.

To save all this information, I'm using a mysql database.

On our free webspace this was very slow so we bought a v-server.

Now my problem:

 

On the free server everything worked quite well (except the speed).

Now on our v-server the inserted information is not sent to the database.

 

PHP is switched on in Plesk.

 

script is:

 

<html>
<body>
<?
if ($submit) {
$db = mysql_connect("localhost", "user", "password");
mysql_select_db("projekte",$db);
$sql = "INSERT INTO projekte (name,vorname,klasse,wahl1,wahl2,wahl3,wahl4) VALUES ('$name','$vorname','$klasse','$wahl1','$wahl2','$wahl3','$wahl4')";
$result = mysql_query($sql,$db);
echo "Ihr Daten wurden abgeschickt! Vielen Dank!<br><br><form method='GET' action='2.php'>
<input type='submit' value='Weiteren Schüler eintragen'>
</form>";
}
else {
?>

<form method="post" action="<? echo $PHP_SELF ?>">

// Uninteresting Parts \\

<td><input type="submit" name="submit" value="Abschicken"></td>
</tr>
</table>
</form>
<?
}
?>
</body>
</html>

 

Does anybody know kind of a solution to my problem?

 

Sorry for my english..^^ I'm german.

 

Greetings, Kevin

Link to comment
https://forums.phpfreaks.com/topic/201400-problems-with-get/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.