Hi there,

can anyone help i seem to be a little stuck.

i wish to use a url eg) http://url/insert.php?insert_text=xxxxxxx
to update an entry in my MySQL dbase.

ie) whatever the value in the string // insert_text=xxxxxx will be entered into my table

any suggestions?

thnks a lot
Dave (za)
"former asp bunny"

    <?php
    $insert_text = $_GET['insert_text'];
    mysql_query('INSERT into your_table VALUES('.$insert_text.')');
    ?>

    Should work.

      theres an error in the query. should be...

      mysql_query("INSERT INTO your_table VALUES ('$insert_text')");
      

        <?php require_once('../../Connections/conn_cyberd.php'); ?>
        <?php
        mysql_select_db($database_conn_cyberd, $conn_cyberd);
        $query_rsNWS_Updt = "SELECT * FROM network_status";
        $rsNWS_Updt = mysql_query($query_rsNWS_Updt, $conn_cyberd) or die(mysql_error());
        $row_rsNWS_Updt = mysql_fetch_assoc($rsNWS_Updt);
        $totalRows_rsNWS_Updt = mysql_num_rows($rsNWS_Updt);

        $nws_scroll = $_GET['nws_scroll'];
        mysql_query('INSERT into network_status VALUES ('$nws_scroll')");

        mysql_free_result($rsNWS_Updt);
        ?>

          No it is not wrong, just a different way of doing it.

            do you have an easier way? ... i would like to update a specific id

            eg WHERE nws_id = 2

            thanks

              Write a Reply...