Runtime Validation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ashrafzia
Forum Commoner
Posts: 37
Joined: Wed Sep 28, 2005 12:23 pm

Runtime Validation

Post by ashrafzia »

Hi Gurus!

I wana do some runtime validation. For example, i have a form with some check boxes.
like :

Select Toys Cat : Airoplanes checkbox1, Cars checkbox2

if someone checks airoplanes then

all different types of airoplanes names should come in a multiple selection listbox below in the following format.
Suppose:

Selected toys : fighter plane
resuce plane
passenger plane etc.....

Any idea! How can i do this thing.

If this thing was to be done in a software like Vb.net etc then it was a piece of cake, i m wondering how can i do such thing in php???
User avatar
Stryks
Forum Regular
Posts: 746
Joined: Wed Jan 14, 2004 5:06 pm

Post by Stryks »

Runtime? You mean, without page reload?

Take a gander at this thread
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Post by aceconcepts »

If you dont mind using a page reload method then you could use pure PHP in order to display sub cats.

Create a query based on the selected value form a <select> list. Then run a loop to get the associated sub categories.

If you don't want to have to 'click' a button to get the sub cats then you're gonna have to use js etc...
ashrafzia
Forum Commoner
Posts: 37
Joined: Wed Sep 28, 2005 12:23 pm

Post by ashrafzia »

Stryks wrote:Runtime? You mean, without page reload?

Take a gander at this thread
Yes, i do mean, without page reload, THanks for the link, i have tried it, but its for list box and i want to use a check box instead of list box.

2ndly its ajax and i want to use pure PHP for it.
ashrafzia
Forum Commoner
Posts: 37
Joined: Wed Sep 28, 2005 12:23 pm

Post by ashrafzia »

aceconcepts wrote:If you dont mind using a page reload method then you could use pure PHP in order to display sub cats.

Create a query based on the selected value form a <select> list. Then run a loop to get the associated sub categories.

If you don't want to have to 'click' a button to get the sub cats then you're gonna have to use js etc...
Yes, thats what i want. If you don't mind, Could [s]u[/s] you [s]plz[/s] please gimme an example or code for it ?

Thanks in Advance
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:11. Please use proper, complete spelling when posting in the forums. AOL Speak, leet speak and other abbreviated wording can confuse those that are trying to help you (or those that you are trying to help). Please keep in mind that there are many people from many countries that use our forums to read, post and learn. They do not always speak English as well as some of us, nor do they know these aberrant abbreviations. Therefore, use as few abbreviations as possible, especially when using such simple words.

Some examples of what not to do are ne1, any1 (anyone); u (you); ur (your or you're); 2 (to too); prolly (probably); afaik (as far as I know); etc.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

You said you wanted it without a page reload (Ajax), then your next post you said you wanted it with a page reload.. which one is it?
ashrafzia
Forum Commoner
Posts: 37
Joined: Wed Sep 28, 2005 12:23 pm

Post by ashrafzia »

Jcart wrote:You said you wanted it without a page reload (Ajax), then your next post you said you wanted it with a page reload.. which one is it?
Sorry, i wanted it without a page reload (Ajax). My apologies.
Post Reply