954,173 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Variable Validation & MYSQL

<?php

$connection = mysql_connect($hostname,$username,$password);
mysql_select_db($databaseName, $connection);


$submit = $_POST['submit'];
$comment = $_POST['comment'];
$email = $_POST['email'];

if(isset($submit)) {

//if(isset($submit)) {
// check if user exists in the database
$query = mysql_query("SELECT email FROM user_table WHERE email = '".$email."'");
//$num_rows = mysql_num_rows($query_email);
//if(!$num_rows) die('Gizmerror!! Either you have typed your USERNAME and or Your PASSWORD incorrectly or you have not registered to access this pages.


Please Try Again ');

//mysql_query ( "INSERT INTO user_comment (email, comment) VALUES ('$email', '$comment');

$insert = "INSERT INTO user_comment SET
email = '$email',
comment = '$comment'";

//mysql_query($insert);
//$row_comment = mysql_fetch_Array($query);
die("");

//die("Thank you for registering. Your Registration was Successful! You can now login");

//$insert = "INSERT INTO user_comment SET
//comment = '$comment'";

//mysql_query($insert);

die("Thank you for registering. Your Registration was Successful! You can now login");

//}

//echo mysql_error();
//mysql_close();
}
?>


Your Comment:


Email Address:


...or return to our Homepage


vexer007
Newbie Poster
4 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

Half the commands are commented...

Roberdin
Supreme Evil Overlord
Team Colleague
282 posts since Feb 2003
Reputation Points: 63
Solved Threads: 6
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You