Jump to content

if echo.. else echo..


timmy2

Recommended Posts

			$chkEmail = mysql_query("SELECT * FROM `userregistration`");
			while($getEmail= mysql_fetch_assoc($chkEmail)):
				if($_POST['EmailRegistration'] == $getEmail['Email') {
					  echo 'success';
				}
				else
				{
					echo 'failed';
				}
			endwhile;

Link to comment
Share on other sites

will the code that teng84 do

... will be using a session variable not a GET one and also I want a list of stuff from a mysql database and if one matches something than it changes text color or something like that...

 

... THere's going to be a whole list and if it matches I only want one row to change color...

??

 

 

Link to comment
Share on other sites

I did not ask you to write the code!

I asked if teng84's example would let me do what I stated in my earlier posts

I dont want to spend a whole day trying to adapt it to my code and find out at the end of the day that the example would not do the thing I wanted

 

FYI: I'm a newbie

Link to comment
Share on other sites

It would do what you want if you changed get to session. And if you are a newbie, then try to learn what each thing does, hence making the information this forum gives you much more adaptable. This code would take you maybe 5 min to adapt, hardly the whole day.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.