Parašė edeni· 2010 Kov. 28 19:03:10
#23
Busiu geras ir padėsiu:
Failas pridetas.php
<?php
$con = mysql_connect("CIA MYSQL SERVERIO IP AR localhost","USER","PSW");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$ip = mysql_real_escape_string(stripslashes($_POST[ip]));
$port = mysql_real_escape_string(stripslashes($_POST[q_port]));
mysql_select_db("LENTELE", $con);
mysql_query("INSERT INTO lgsl (ip, q_port) VALUES ('$ip', '$port')");
mysql_close($con);
?>
Failas prideti.php:
<html>
<body>
<form action="pridetas.php" method="post">
Firstname: <input type="text" name="ip" />
Lastname: <input type="text" name="q_port" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>
Va :) gali kodas neveikt, nes nebandžiau.
Redagavo edeni· 2010 Kov. 28 19:03:33