Jump to content

If / Else Statements (PHP Newbe, Still Struggling)


Marcus2000

Recommended Posts

Hi people,

 

please can any of you guys help us out? I need to write some php code but i'm getting more and more confused everytime i get into php.

 

Anyways this is what i'm trying to do on my site:

 

I want the user to type in a company name in a text field in a very simple html form.

The user hits submit buton and the text the user typed in gets sent to a php document for processing.

If the user has typed in a company name that matches one of the 3 company names that i have, then the user gets sent to one page. (sucess page)

If the what the user has entered into the search form does not match one of my 3 company names, then I want them to be sent to another page (error page).

 

I know this is real simple stuff guys, but i just cant get my head round this so far, please, please help.

 

Many thanks in advance,

Marcus.

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.