Jump to content

oops73

Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Everything posted by oops73

  1. Hi Ken, please take a look at the code agian. I have set "IDcode" as "unique_id" in the database. If i add a "unique_id" field in the table i got my premade errormessage saying that there is an error adding to database. any ideas? /Joel
  2. ok, Here is an overview of the code so it´s easier to help me. // variables // $listVar = array('IDcode', 'unique_id', 'Fname', 'Lname', 'Region', 'Depart', 'Email'); $noEmptyCheck = array('unique_id'); // Collect variables FORM // foreach ($listVar as $value) { if ($value !== 'IDcode' || $value !== 'unique_id') { isset($_SESSION[$value]) ? $$value = htmlentities(trim($_SESSION[$value]), ENT_QUOTES) : $$value = NULL; } } isset($_POST['IDcode']) ? $IDcode = $_POST['IDcode'] : $IDcode = NULL; ////////// WORK now ///////// if (isset($_POST['action']) && ('add' == $_POST['action'])) { ////////// ACTION ///////// // Collect variables ACTION // foreach ($listVar as $value) { isset($_POST[$value]) ? $$value = htmlentities(trim($_POST[$value]), ENT_QUOTES) : $$value = NULL; } // Check If UNIQUE // $db = mysql_connect($host, $login, $password) or die ('Erreur connection'); mysql_select_db($base, $db) or die ('Erreur select database'); echo "ID: ".$unique_id; $result = mysql_query("SELECT * FROM users WHERE unique_id='$unique_id'"); $num_rows = mysql_num_rows($result); $num_rows > 0 ? $unique = FALSE : $unique = TRUE; mysql_close(); if (FALSE == $unique){ $error['unique_id'] = "Already send to the database!"; } else if (TRUE == $unique) {
  3. Thanks for the replay. the change helped a bit, but i got this instead : Unknown column 'unique_id' in 'where clause' any idea?
  4. Hi all! Can anyone take a look at this code and explain to me why i get this error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in i:\easyphp1-8\www\project.php on line 36 I have tried and tried... nothing works. Please take a look. Thanks! // Check If UNIQUE // $db = mysql_connect($host, $login, $password) or die ('Erreur connection'); mysql_select_db($base, $db) or die ('Erreur select database'); $result = mysql_query("SELECT * FROM users WHERE unique_id='$unique_id'"); $num_rows = mysql_num_rows($result); // LINE 36 <--- $num_rows > 0 ? $unique = FALSE : $unique = TRUE; mysql_close(); if (FALSE == $unique){ $error['unique_id'] = "Already send to the database!"; } else if (TRUE == $unique) {
  5. [!--quoteo(post=373055:date=May 10 2006, 02:10 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 10 2006, 02:10 PM) [snapback]373055[/snapback][/div][div class=\'quotemain\'][!--quotec--] Do you REALLY think it's a good idea to be sassy with an admin? [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /] I have no idea what you've done or what you've attempted. If you listed the things you've done to troubleshoot the problem, we wouldn't be having this part of the conversation. Besides, this is a third-party script problem, nothing to do with PHP. Thread MOVED. [/quote] .......admin......
  6. [!--quoteo(post=373039:date=May 10 2006, 01:42 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 10 2006, 01:42 PM) [snapback]373039[/snapback][/div][div class=\'quotemain\'][!--quotec--] I love it when we get all the information up front. [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /] I suggest you read through the installation manual again. [/quote] hey Einstein... what do you think i did...
  7. [!--quoteo(post=373024:date=May 10 2006, 01:15 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 10 2006, 01:15 PM) [snapback]373024[/snapback][/div][div class=\'quotemain\'][!--quotec--] Is the DNS server set to point to the computer that is running EasyPHP?? If you have a domain name, who does the hosting of that domain? [/quote] Im sure that the DNS server and hosting is out of the picture. 99% sure that its some configuration in easyphp1.8 thats ahve to be done. I had 1.7 before and there where no problem.
  8. [!--quoteo(post=372989:date=May 10 2006, 12:32 PM:name=ober)--][div class=\'quotetop\']QUOTE(ober @ May 10 2006, 12:32 PM) [snapback]372989[/snapback][/div][div class=\'quotemain\'][!--quotec--] err... Nevermind... didn't realize EasyPHP was a complete package with all of that. What address are you typing into your browser from the LAN? You should be using the IP of the computer with the webserver installed. [/quote] since i have a www adress i want users to just write the address and woops they are on my site. when i open localhost it's no problem. but if i try to enter the site via another computer using my www address nothing happens. any idea?
  9. Hi all! how can a get my webpage to be seen on LAN? On localhost it no problem. No firewall and im using easyphp 1.8. Thanx
×
×
  • 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.