Php Codes
Algorithms
Arrays
Authentication
Calendar
Code Snippets
Programs
Content Manage
Contest Related
Cookies
Credit Cards
DBase Related
Databases
Date Time
Directories
E-Mail
Errors
File
File System
Forms
Handling
Graphics
HTML and PHP
Informix
Ingres
InterBase
LDAP
Look and Feel
Miscellaneous
MySQL
Other
PHP Classes
Searching
Navigation
Statistics
Strings
User Manage
Php > Database Related sample source codes
PHP & MySQL Tagboard
PHP & MySQL Tagboard HTML for tagboard:
</iframe>
</form> --post.php-- here</a>."; ?> --view.php-- $row[name]</a>: $row[msg]
"; } ?> --admin.php--
View messages </a>
Delete all messages</a>
"; if($action == "view"){ connect(); $query = "SELECT id,name,http,msg FROM tagboard ORDER BY id DESC"; $result = mysql_query($query); while ($rows = mysql_fetch_row($result)){ echo "
$row[name]</a>: $row[msg] :
Delete</a>
"; } } if($action == "del"){ connect(); $query = "DELETE FROM tagboard WHERE id='$id'"; $result = mysql_query($query); } if($action == "delall"){ connect(); $query = "DELETE FROM tagboard"; $result = mysql_query($query); } if($action == "update"){ connect(); $query = "SELECT id,name,http,msg FROM tagboard ORDER BY id DESC"; $result = mysql_query($query); while ($rows = mysql_fetch_row($result)){ echo "
$row[name]</a>: $row[msg] : ID#: $row[id]
"; } echo "
Message</textarea>
</form>"; } if($go == "yes"){ connect(); $id = stripslashes($id); $id = htmlspecialchars($id); $name = stripslashes($name); $name = htmlspecialchars($name); $http = stripslashes($http); $http = htmlspecialchars($http); $msg = stripslashes($msg); $msg = htmlspecialchars($msg); $query = "UPDATE tagbard WHERE id='$id' SET name='$name' http='$http' msg='$msg'"; $result = mysql_query($query); echo "ID # $id has been edited successfully."; } } ?> --sql syntax-- CREATE TABLE tagboard (id TINYINT (4) not null AUTO_INCREMENT, name VARCHAR (32), msg VARCHAR (50), http VARCHAR (32) , PRIMARY KEY (id))
Privacy Policy
|
Link to Us
|
Links