home

Php Easy Steps To Make Dynamic Page Tutorial


  1. Login to your database by providing your username and password
  2. Use Create Query to Create Database
    CREATE DATABASE nameofdatabase;
  3. Use Create Command to Create Tables
    CREATE TABLE ITEMS_SHAHID4
    (
              ItemID INT PRIMARY KEY AUTO_INCREMENT,
              ItemName VARCHAR(60),
              ItemPrice DECIMAL(10, 2),
              ItemCat VARCHAR(60),
              ItemDesc TEXT
    )
  4. Open a new page of php using dreamweaver or any web designing software
  5. On this web page make a form if its an add page. but if its search page then make a table
    1. Right on the top of the page start your php tag and then follow these steps
    2. get the data from the form and store it in variables, if its an add page . you can get the data from the form by using $_POST
      $name = $_POST['name'];
    • Connect to Database by using two php functions. mysql_connect("server", "user", "password") mysql_select_db("database").
      mysql_connect("10.0.7.5", "student", "bcc");
      mysql_select_db("student");
    • After connecting your website to database, now you can run queryies. to run your query use mysql_query() function..If you are selecting data from database, then your query will be select query. But if you are adding data to databae, then your query will be INSERT query.
      mysql_query("INSERT INTO rich_prods(name, price, cat, description) VALUES('$name', '$price', '$cat', '$desc')")
    • The last step, you can go to database, and check if the information you added is there in databse.

  • Content on this page requires a newer version of Adobe Flash Player.

    Get Adobe Flash player

    all rights reseverd by Cramerz.com©. web development by web design company DotPeak. hosting by HostBay
    all contents on cramerz are the property of Cramerz.com. web design courses