Parašė Mantas_· 2010 Kov. 20 18:03:27
#13
<?php
//$_POST['name'] corresponds to the textfield named "name"
if($_POST['shoutcast']) {
//DB Credentials
$host = "host";
$user = "name";
$pass = "pass";
//Connect to the database
$con = mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db("db") or die(mysql_error());
$name = mysql_real_escape_string($_POST['shoutcast']);
$sql = "UPDATE Persons SET shoutcast='{$shoutcast}' ";
mysql_query($sql) or die(mysql_error());
echo "UPDATED! Whooooohooo";
}
?>
<form action="" method="post">
<input type="text" name="shoutcast" />
<input type="submit" />
</form>
Nu pasidariau kažką :D bet neveikia.. neįrašo į lentelę,