Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
44Activity
0 of .
Results for:
No results containing your search query
P. 1
Php Code Example for View Edit Delete Search Update Database Table

Php Code Example for View Edit Delete Search Update Database Table

Ratings: (0)|Views: 7,342 |Likes:
Published by Gunjan
Php Code Example for View Edit Delete Search Update Database Table
Php Code Example for View Edit Delete Search Update Database Table

More info:

Published by: Gunjan on Aug 09, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

06/20/2013

pdf

text

original

 
Php Code for View, Search, Edit and Delete Record
2010/RJ2013
Php Code for View, Search,Php Code for View, Search, Edit and Delete Record fromEdit and Delete Record from MySql TableMySql Table
PHP (recursive acronym for "PHP: Hypertext Preprocessor") is a widely-used Open Source general-purpose scripting language that is especiallysuited for Web development and can be embedded into HTML.This is the simple Code Example through which you can insert, Delete,View , Update from MySql Database.Paste this code and save the file as written above. Create a databasenamed test and create a table student as below structure.MySql TableCREATE TABLE `student` ( `roll` int(11) default NULL, `class`varchar(20) default NULL, `name` varchar(40) default NULL, `f_name`varchar(40) default NULL, `sex` varchar(6) default NULL, `addr1`varchar(20) default NULL, `addr2` varchar(20) default NULL, `addr3`varchar(20) default NULL, `city` varchar(20) default NULL, `phone`varchar(12) default NULL, `email` varchar(100)default NULL, `remarks` varchar(40) default NULL) ENGINE=InnoDBDEFAULT CHARSET=utf8;
Code Example Page 1
 
Php Code for View, Search, Edit and Delete Record
2010/RJ2013
Index.php [Main or Home Page]
<html><head><meta name="description"content="Php Code for View,Search, Edit and DeleteRecord" /><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /><title>Search StudentRecord</title></head><body><center><h1><u>Student Database</u></h1></center><form name="search" method="post" action="search.php"><table style=" border:1px solid silver" cellpadding="10px" cellspacing="0px"align="center"><tr><td colspan="3" style="background:#0066FF; color:#FFFFFF; font-size:20px">Search</td></tr><tr><td>Enter Search Keyword</td><td><input type="text" name="search" size="40" /></td><td><input type="submit" value="Search" /></td></tr><tr><td colspan="3">&nbsp;</td></tr><tr bgcolor="#CCCCCC"><th><a href="add.php">Add Record</a></th><th><a href="del.php">Delete Record</a></th><th><a href="del.php">Update Record</a></th></tr></table></form></body></html>
Code Example Page 2
 
Php Code for View, Search, Edit and Delete Record
2010/RJ2013
Search.php<?mysql_connect("localhost");mysql_select_db("test") or die("database could notconnect ");?><html><head><meta name="description"content="Php Code for View,Search, Edit and DeleteRecord" /><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" /><title>Search Student Record</title></head><body><center><h1><u>Student Database</u></h1></center><form name="search" method="post" action="search.php"><table style=" border:1px solid silver" cellpadding="5px" cellspacing="0px"align="center" border="0"><tr><td colspan="3" style="background:#0066FF; color:#FFFFFF; font-size:20px">Search</td></tr><tr><td>Enter Search Keyword</td><td><input type="text" name="search" size="40" /></td><td><input type="submit" value="Search" /></td></tr><tr bgcolor="#666666" style="color:#FFFFFF"><td>Roll & class</td><td>Name & Father's Name</td><td>&nbsp;</td><?$search=$_POST["search"];$flag=0;$query="select * from student where name like '%$search%' ";$result=mysql_query($query);while ($row = mysql_fetch_array($result)) {$flag=1;echo "<tr ><td>",$row[0],", ",$row[1],"</td><td><a href='view.php?roll=",$row[0],"'>",$row[2],", ",$row[3],"</a></td><td><a href='edit.php?roll=",$row[0],"'>Edit</a> | <a href='del.php?roll=",$row[0],"'>Delete</a></td></tr>";}if($flag==0)echo "<tr><td colspan='3' align='center' style='color:red'>Record not
Code Example Page 3

Activity (44)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Hima Ahmed liked this
Arnold T Marowa added this note
great tutorial
Richie Kenshin liked this
Richie Kenshin liked this
Pritam Patil liked this
fabyo72 liked this
Andri Ramadhan liked this
mie_system917844 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->