Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: padėkit..

Parašė edeni· 2010 Kov. 21 11:03:30
#19

apdorojimas.php
<?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='{$name}' ";
    mysql_query($sql) or die(mysql_error());

    echo "UPDATED! Whooooohooo";

}

?>