Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Klausimas del lgsl

Parašė swz· 2010 Kov. 28 19:03:29
#24

Nu va paziurek gal kas ka blogai surasiau i insert arba idejimo tuos

Insert.php
<?php
$con = mysql_connect("localhost","egiux11_1","pass");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("egiux11_1", $con);

$sql="INSERT INTO Persons (id, type, ip, c_port. q_port, s_port,)
VALUES
('$_POST[id]','$_POST[type]','$_POST[ip]','$_POST[c_port]','$_POST[q_port]','$_POST[s_port]')";

if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
echo "1 record added";

mysql_close($con)
?>




Pateikimas.php
<html>
<body>

<form action="insert.php" method="post">
Game Type: <input type="text" name="Game Type" />
IP: <input type="text" name="IP" />
Connection Port: <input type="text" name="Connection Port" />
Query Port: <input type="text" name="Query Port" />
Software Port: <input type="text" name="Software Port" />
<input type="submit" />
</form>

</body>
</html>



ok dekui. Ot koks geras zmogus!
;););)

Redagavo swz· 2010 Kov. 28 19:03:27