Jump to content

powerdot

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

powerdot's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. OK, this make me mat  :( I'm sure from the first and therefore I have put the suggestion from "redarrow" (thanks) for echo out the username in a single script named test.php. This is the script: [quote] <?php $var_username = " "; $skipflag = FALSE; $link = mysql_connect("localhost", "powerdo_web", "*******") or die("Error: " . mysql_error());         mysql_select_db("powerdo_accounts", $link);         $query = "SELECT `username` FROM `host_list` WHERE `username`='" . mysql_real_escape_string($_POST['$var_username']) . "' LIMIT 1";       $result=mysql_query($query)or die('Query Failed. '.mysql_error()."\n"); while($record=mysql_fetch_assoc($result)){ echo $record['username']; {             print "<font color=\"#660000\"><strong>* Required field -- \"Your Username\" is not valid. Please fix this and re-submit.</strong></font> \n";             $skipflag = true;         } } ?> [/quote] I receive only a blank page, no errors, no username, nothing.
  2. Thank you for your post!  :D redarrow : I tried the 3 codes but all unsuccessfull. prm : sorry, this must be right since this variables are used by the script for select the one specific departement where I want to verify the username. Ohter suggestions? Again Thank You All.
  3. Hello, 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: [quote] if ((isset($_POST['form_subject'])) && ($_POST['form_subject'] == $subject_option[1]['subj']))     {         $link = mysql_connect('localhost', 'powerdo_web', "*******");         mysql_select_db(powerdo_accounts', $link);         $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;         }     } [/quote] 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? Thank you, Natalia.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.