Posts

Showing posts from March, 2019

Crud

Db.php <?php mysql_connect("localhost","root",""); mysql_select_db('crud'); echo "crud Database" ?>              ====================================================== <?php // Steps Edit ////////////////////Show data in the edit field // 1 connection // $id = $_GET['edit']; variable to get data from the last page from <a href="edit.php?edit=' $row['id']">edit</a> //$query = mysql_query("select * from table where id='$id' "); //catch data in $row = mysql_fetch_array($query); //Show data in input field in value="<?php echo $row['id']; > " /////////////// // Update data // if(isset($_POST['update'])){ // set variable names $name=$_POST['name']; and phone etc //$update = "update table set name ='$name' , phone='$phone' where id='$id' "; // $result =mysql_query($update); //} in...