It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Markers on form

Markers on form

Postby dazz_club on Wed Sep 21, 2005 1:28 pm

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
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 7:35 am
Location: Chester and Hull

Postby Protege on Wed Sep 21, 2005 2:39 pm

Would you like me to just build that form for you/any other project you're doing?
</sarcasm>
Protege
50+ Club
 
Posts: 67
Joined: Mon Sep 19, 2005 8:05 am
Location: Scotland

Postby Ash on Wed Sep 21, 2005 2:56 pm

Protege wrote:</sarcasm>


Lol :D </sanity>
User avatar
Ash
1000+ Club
 
Posts: 1020
Joined: Wed Aug 03, 2005 6:10 pm
Location: England

good

Postby dazz_club on Wed Sep 21, 2005 3:01 pm

</insert laughter here>
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 7:35 am
Location: Chester and Hull

Postby Protege on Wed Sep 21, 2005 4:19 pm

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: Select all
<input type="text" name="lazy">

PHP:

if(!$_POST['lazy'])
{
echo("Fill it in please");
}

Protege
50+ Club
 
Posts: 67
Joined: Mon Sep 19, 2005 8:05 am
Location: Scotland

im not a code whore, i do try

Postby dazz_club on Wed Sep 21, 2005 7:16 pm

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.
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 7:35 am
Location: Chester and Hull

Postby webmaster on Wed Sep 21, 2005 8:43 pm

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 } ?>[/php]
Make sure to check out our TNX Review and Link Vault Review
User avatar
webmaster
Site Admin
 
Posts: 2695
Joined: Tue Aug 17, 2004 1:07 pm
Location: Sweden

Re: im not a code whore, i do try

Postby Protege on Wed Sep 21, 2005 10:00 pm

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.
Protege
50+ Club
 
Posts: 67
Joined: Mon Sep 19, 2005 8:05 am
Location: Scotland


Who is online

Users browsing this forum: No registered users and 7 guests