| View previous topic :: View next topic |
| Author |
Message |
dazz_club 250+ Club

Joined: 15 Jul 2005 Posts: 313 Location: Chester and Hull
|
Posted: Wed Sep 21, 2005 2:28 pm Post subject: Markers on form |
|
|
Hi people.
Its a form question, again. You know when sometimes you fill out a form, press send and the next page that appears is one saying you have filled it out wrong, displaying a marker or a flag next the input box that has not been filled in correctly.
how would i go about doing that?
cheers |
|
| Back to top |
|
 |
|
|
Protege 50+ Club
Joined: 19 Sep 2005 Posts: 68 Location: Scotland
|
Posted: Wed Sep 21, 2005 3:39 pm Post subject: Re: Markers on form |
|
|
Would you like me to just build that form for you/any other project you're doing?
</sarcasm> |
|
| Back to top |
|
 |
Ash 1000+ Club

Joined: 03 Aug 2005 Posts: 1016 Location: England
|
Posted: Wed Sep 21, 2005 3:56 pm Post subject: Re: Markers on form |
|
|
| Protege wrote: |
| </sarcasm> |
Lol </sanity> |
|
| Back to top |
|
 |
dazz_club 250+ Club

Joined: 15 Jul 2005 Posts: 313 Location: Chester and Hull
|
Posted: Wed Sep 21, 2005 4:01 pm Post subject: good |
|
|
| </insert laughter here> |
|
| Back to top |
|
 |
Protege 50+ Club
Joined: 19 Sep 2005 Posts: 68 Location: Scotland
|
Posted: Wed Sep 21, 2005 5:19 pm Post subject: Re: Markers on form |
|
|
I'm not having a go at you mate. If you just ask for help without doing a bit of research and hold your hand out for code (so to speak), you'll never learn how to do things for yourself. Not to mention you'll never understand what the code actually does.
I'm all about helping, but sometimes you have to do things for yourself. Then, and only then should you post about something. We were all newbs at one point in our life, and I understand that, but just asking for code is not the right way to go about it.
Now, like I said, I'm all about helping.. so here's some code.
| Code: |
<input type="text" name="lazy">
PHP:
if(!$_POST['lazy'])
{
echo("Fill it in please");
}
|
|
|
| Back to top |
|
 |
dazz_club 250+ Club

Joined: 15 Jul 2005 Posts: 313 Location: Chester and Hull
|
Posted: Wed Sep 21, 2005 8:16 pm Post subject: im not a code whore, i do try |
|
|
Hi,
sorry if you thought i was just asking for asking for the code, in all honesty i wouldnt know where to start in regards to creating this particular code myself. When you guys help out with codes and stuff, thats when i learn because i always have to edit ti to suit what i need, indoing thats when understand what line of code does what.Only now i am understanding how it works by gradually building a form and using this as a foundation to improve upon my php knowledge.
cheers for your help, i`m alsways appreciative people like yourself. |
|
| Back to top |
|
 |
webmaster Site Admin

Joined: 17 Aug 2004 Posts: 3614 Location: Sweden
|
Posted: Wed Sep 21, 2005 9:43 pm Post subject: Re: Markers on form |
|
|
Something like this maybe:
| PHP: |
<?php if (isset($_POST['submit'])) {
if (isset($_POST['test'])) {
echo "DO WHATEVER YOU WANT";
} else {
echo "YOU FORGOT TO ENTER SOMETHING IN THE TEST_FIELD";
}
} else { ?>
<form method="post" action="">
<input type="text" name="test" />
<input type="submit" name="submit" />
</form>
<?php } ?>
|
|
|
| Back to top |
|
 |
Protege 50+ Club
Joined: 19 Sep 2005 Posts: 68 Location: Scotland
|
Posted: Wed Sep 21, 2005 11:00 pm Post subject: Re: im not a code whore, i do try |
|
|
| dazz_club wrote: |
Hi,
sorry if you thought i was just asking for asking for the code, in all honesty i wouldnt know where to start in regards to creating this particular code myself. When you guys help out with codes and stuff, thats when i learn because i always have to edit ti to suit what i need, indoing thats when understand what line of code does what.Only now i am understanding how it works by gradually building a form and using this as a foundation to improve upon my php knowledge.
cheers for your help, i`m alsways appreciative people like yourself. |
Maybe I was a bit harsh, and for that I'm sorry. It is easy to forget being new and not really having a clue what to search for. Hope any of the above bits of code help you. |
|
| Back to top |
|
 |
|