j33baS Posted March 12, 2008 Share Posted March 12, 2008 Hi im trying to make a little script to improve a registration page, its your standard affair with 2 password textfeilds which need to equal each other and a jpg with text in which the user must type out, looks sumthing like ... <?php if($_POST['submit']) { if($_POST['password'] == $_POST['password2']){ if($_POST['verifyimg'] != "1234"){ require("header.php"); echo "you did not type out the text in the image correctly"; } else { $sql = "IBIG SILLY QUERY"; blahblah } } else{ require("header.php"); echo "you mistyped your password"; } } else { require("header.php"); ?> forms and submit button .... I realise this is a very silly and ugly way to do it and it also doesnt completely work... If you type the text in the image, it performs the query without checking the password if they are left empty, because empty == empty. Is there a way i could improve this ? I was thinking a list of else if's ? but can i compare 2 conditions in one go ? for example ... else if(password1 == password2) && (image = imagetxt){ } Any help greatly appreciated, im far from the best programmer ! Quote Link to comment Share on other sites More sharing options...
revraz Posted March 12, 2008 Share Posted March 12, 2008 Yes, you can I was thinking a list of else if's ? but can i compare 2 conditions in one go ? for example ... else if(password1 == password2) && (image = imagetxt){ } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.