1 / 13

Done by: Mashail Alsolamy

Login to a Database (from a Webpage), Inserting data into a database from a form, getting data from database and display on Webpage . Done by: Mashail Alsolamy. Tools:. Notepad++ Internet Explorer WampServer. Outlines:. Connecting to Database (Login to Database)

gabe
Télécharger la présentation

Done by: Mashail Alsolamy

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Login to a Database (from a Webpage), Inserting data into a database from a form, getting data from database and display on Webpage Done by: MashailAlsolamy

  2. Tools: • Notepad++ • Internet Explorer • WampServer

  3. Outlines: • Connecting to Database (Login to Database) • Insert data into database from a form • getting data from database and display on Webpage

  4. Why do we choose MySQL Database? MySQL is currently the most popular open source database server in existence. It is very commonly used in conjunction with PHP scripts to create powerful and dynamic server-side applications.

  5. MySQLphpMyAdmin: It is a popular web interface that is included with almost every type of Shared, Virtual or Dedicated hosting solution and the very popular phpMyAdmin tool should come with your web hosting plan.

  6. How do we open phpMyAdmin and create databases and tables: • Open your cPanel. • Click on phpMyAdmin in the section of database. • Create a new database • Create a new user with password • Assign the user to the database • Create table inside this database. Server : localhostDatabase : test Table : example Username : admin Password : 1admin Example

  7. Login to Mysql Database from webpage: • Create login form to access the database through it. • Verify the username and password

  8. 3. If username and pass word correct then use bellow command to connect to certain database. // Make a MySQL Connection mysql_connect( host, username, password) or die (mysql_error()); mysql_select_db( Name of database) or die (mysql_error()); The default values in wampserver are: Host=“localhost” Username=“root” Password=“”

  9. 4. After connect, we can insert data to the table through the form.

  10. 4. To display The contents of the table onto a webpage use this command:

  11. 4. To delete a record from the table use this command:

  12. Thank you for your attention and I hope I explained the subject well

More Related