Jump to content

johnseito

Members
  • Posts

    138
  • Joined

  • Last visited

Everything posted by johnseito

  1. I looked before I started this thread, so yes I have look for a bit.
  2. I look everywhere on the web, I couldn't see on how to do that. So how does that go into the browser, could you provide me some examples? Thanks
  3. user input string into browser, system returns the name of any table that contains this string . and when user click on the name of a table display the names of all attributes in that table, and when user click on attribute it display the names of all table containing this attribute. how can I do this? I'm new to metadata. Thanks
  4. in plain english how does this throw an error?? for example if first password is jhkgfl 2nd password is aefegg both are 6 characters both are greater than 4, both password doesn't match.. so how would it throw an error? KingP if you don't understand,, than I don't think you should try to help me. I don't see what you write as make sense. Your code earlier I already know, and your not helping at all, your are typing again the same thing earlier and I told you why that is not how I wanted it and it's incorrect. KingP your are providing a simple solution.. my solution is not as simple as you have it.. so I don't need to check both password length is not right.
  5. if(($_POST['password1'] != $_POST['password2']) || (strlen($_POST['password1'])<=4)) with KingP's code earlier they could leave a field blank.
  6. except one of the if statement, the one I listed on top, I have problem with.
  7. anyone know why this code is giving an error. I run my page with this code and my form page disappears. if (trim($_POST['psswrd']) != trim($_POST['repsswrd']) && (strlen(trim($_POST['psswrd']))>=4 && strlen(trim($_POST['repsswrd']))>=4)) Crayon Violent .. I have separate if statement for checking blanks to either field, and character less than 4 to either field and no blanks, and if fields are greater than 4 but password doesn't match. 5kyy8lu3 thank you for your code.. I will take a look at it and try it out.
  8. you forgot that if someone doesn't enter anything in the field, either field and it will tell them that that field is required. I have this done and it works out correctly. With your statement of length of first field less than 4.. you are ignoring this no?? you are actually tell the person, password either doesn't match or is too short when they didn't even enter anything. I only want it to say "your password doesn't match" when they have both field with length greater or equal to 4. if either field is less than 4 then it say "Your password need at least 4 characters." and both field with the same length doesn't mean password match. If both password are EQUAL then I don't need to handle it with code and it will just accept it.
  9. why you say I need that? I tried that as you say.. and even if blank fields are enter: the codes say "Your password does not match. Password are case sensitive." that wouldn't be right because password not match because the field is blank. we are going around in a circle.
  10. yea that coding logic is not right.. I need something like this: if "passwrd" NOT equal "repsswrd" and passwrd >= 4 and repasswrd >= 4 then "Your password does not match. Password are case sensitive." end if but I tried putting this into code and it's giving error.
  11. YES greater or equal to 4. The reason is because... two fields for password.. kinda of retype password again. if either password fields, "psswrd" and "repsswrd" are blank it will say this field is required. if either of these field is not blank and only if these two field are less than 4 characters it will say "Password needs to be at least four characters" if both of these fields are 4 characters or more and does not equal (is not same) it will say: "Your password does not match. Password are case sensitive." This last part of the code is what I didn't do because I tried putting two && and the code doesn't work. to your Question again.. yes Greater than or equal to 4 thanks
  12. How you know I am wrong? You don't even know how I want my logic to be.
  13. two variable are not the same, they have separate fields. I tried your code and it doesn't work. if (trim($_POST['psswrd']) != trim($_POST['repsswrd']) or strlen(trim($_POST['psswrd'])) >=4) if both field psswrd, and repsswrd are not blank and also both are 4 characters are more and it gives me Password needs to be at least four characters. Your password does not match. Password are case sensitive.
  14. Sasa .. thanks .. I need to test two password variables to see if first they are the same... and that both variable "psswrd" and "repsswrd" are greater and equal to 4.. for the program to say "Your password does not match. Password are case sensitive." Your code only test one of the variable if they are greater than 4. Looks to me like we need a code : if "passwrd" NOT equal "repsswrd" and passwrd >= 4 and repasswrd >= 4 then "Your password does not match. Password are case sensitive." end if see if you could put that into php thanks.
  15. Hi If someone could help me with putting this code together. It's putting two && code together, I tried many times and it hasn't work for me. example... If someone enter passwrd, then enter a 2nd repasswrd, and they are not the same, AND if both passwrd and repsswrd are greater and equal to 4 then tell the program to say "Your password does not match. Password are case sensitive." Thanks.
  16. paul2463-- the reason why I have my code wrong from yours is because I kinda of know that code too, but I wasn't sure so I thought I had it right and so I was looking at your code so quickly and not in details that I thought you have the same code, so I just used what I have and it was WRONG. my fault. can you see if you can address my problem I have on top with your new code. Thanks,
  17. so how does that code that I have not store the variables? The difference is that you added this header( "Location: http://localhost/inputresult.php?username=".$_GET['username']."&password=".$_GET['password'] ); what I highlighted in red. your code works but I think there is two problem with it, one is that I have a lot of conditions or the fields, example if not all the field is enter to highlight the word next to the field red and don't post on the next page inputresult.php But because when I use your header, sometimes my conditions didn't work, when a field is left blank it still show the inputresult.php page. possible reason why : I think it has to do with the url holding the variables, even if some fields are blank it is still redirecting it to the other page and show what was posted. I then did a test to see why is that, so I delete the header, and in the url it still show a bunch of when it should be showing only
  18. Yup, I did try it. Can you try it again, but refresh your page after you update your code. Here is my code and it didn't work for me. userinput.php <?php if (isset($_GET['TEST'])) { header( "Location: http://localhost/userinput.php?" . $_POST['username'] . "&" . $_POST['password'] ); } ?> <form method="GET" action=""> <input type="text" name="username"> <input type="password" name="password"> <br> <input class="gray" type="submit" name="TEST"/> resultinput.php <?php print"<br>"; echo $_GET['username']; echo $_GET['password']; print"<br>"; ?> <a href="http://localhost/userinput.php">user input</a>
  19. This code that you have on top didn't work because , so the userinput.php page is not going to show.
  20. I created a userinput form for user input, and inputresult to show the use input. I use header so that I can add conditions that if all the field is filled, then go to inputresult to show all the field enter. while using header, I use GET instead of POST b/c post can't pass the variable to a header. But this doesn't work either. The result is completely blank. Here is the user input page PHP Code: <?php if (isset($_GET['TEST'])) { header( "Location: http://localhost/inputresult.php" ); } ?> <form method="GET" action=""> <input type="text" name="username"> <input type="password" name="password"> <br> <input class="gray" type="submit" name="TEST"/> Here is the input result page PHP Code: <?php print"<br>"; echo $_GET['username']; echo $_GET['password']; print"<br>"; ?> <a href="http://localhost/userinput.php">user input</a> the result page is still BLANK AFTER THE GET instead of POST. any ideas?
  21. This code looks good, but lets say for example, I only want to post what is filled when everything is filled(CONDITION) how would I do that with this code then? You know what I mean?
  22. Here is an example <?php mysql_connect("localhost", "xxx", "xxx");//CONNECT TO MYSQL mysql_select_db("test"); //SELECT DATABASE $data = mysql_query("SELECT * FROM register"); // or die(mysql_error()); while($info = mysql_fetch_array( $data )) { print <<<HERE <h1>Registered</h1> <p>Thank you, you have registered - you may now login</a>.</p> <table border=0> <tr><td width=200><font color=black>First, Last Name: </font></td> <td><font color =gray> $info[firstname] ,$info[lastname] </font></td></tr><br> <tr><td><font color=black>Gender: </font></td> <td> <font color =gray>$info[gender] </font><BR></td></tr> <tr><td><font color=black>Birthday: </font></td> <td><font color =gray>$info[month] $info[day] $info[year] </font></td><BR></tr> HERE; } ?>
  23. what if I created a database and store all the users input, I want to show all of it on inputresult.php I created a example with while loop fetch and it shows blanks so far.
  24. Hello, Could someone show me a code example of when a user click on the submitted button on a form after filling it out, that all these information will be on another php program. For example: userinput.php (click submitted --- after filling the input field) inputresult.php (show the result of the data filled in this page) Thanks,
  25. Kool thanks, how about option values? such as this: <option value="" <?php if ($_POST['gender'] == '') echo ' selected="selected"'; ?>>- Select One -</option> and ones with loops etc
×
×
  • 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.