I hope to find here some help. I have a great php contact form that send the content to different email addresses.
Only for one department I want that the script look into an existing database if the username is accurate. If not a warning message need to be given and saying to fix the ticket.
I have insert this:
if ((isset($_POST['form_subject'])) && ($_POST['form_subject'] == $subject_option['subj']))
$link = mysql_connect('localhost', 'powerdo_web', "*******");
$query = "SELECT `username` FROM `member_list` WHERE `username`='" . mysql_real_escape_string($_POST['$var_username']) . "' LIMIT 1";
if (mysql_num_rows(mysql_query($query)) != 1)
print "<font color=\"#660000\"><strong>* Required field -- \"Your cPanel Username\" is not valid. Please fix this and re-submit.</strong></font><br>\n";
$skipflag = true;
All tickets are send: without username; with a valid username and with a unvalid username.
It seems the script doesn't look into the database for verify the usernames.
Can somebody help me out this problem please?