Taking Creativity To A New Level
HomePortalInhouse AnimationsDownloadsLog inMemberlistSearchUsergroupsRegisterLinks

Share | 

 Create file add_topic.php

Go down 
Starting Activeness
Starting Activeness

Posts : 3
Join date : 2010-05-03

PostSubject: Create file add_topic.php   Mon May 03, 2010 4:07 am

############### Code

$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="forum_question"; // Table name

// Connect to server and select database.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");

// get data that sent from form

$datetime=date("d/m/y h:i:s"); //create date time

$sql="INSERT INTO $tbl_name(topic, detail, name, email, datetime)VALUES('$topic', '$detail', '$name', '$email', '$datetime')";

echo "Successful<BR>";
echo "<a href=main_forum.php>View your topic</a>";
else {
echo "ERROR";


n methyl d aspartate
4life transfer factor
Back to top Go down
View user profile
Create file add_topic.php
Back to top 
Page 1 of 1
 Similar topics
» How To Create Clickable Links
» Did Victor Surge Actually Create Slender man
» 2nd save files
» Create Music Box Versions of Songs Using Audacity
» How To Create Your Own Dash Lines.

Permissions in this forum:You cannot reply to topics in this forum
Flash-Revival :: Creativity :: Tutorials-
Jump to: