Wrox Programmer Forums
|
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 14th, 2004, 09:21 AM
Authorized User
 
Join Date: Aug 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to spraveens
Default regarding Forms

Hi

  I have a form , now there is one combo box and one text box , now what ever the user chooses from the combo box should come to the text box automatically . How do I do it??

Thanks

Praveen

 
Old February 14th, 2004, 02:31 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

This looks like a job for... JavaScript! PHP is a server side language, whereas JavaScript is for dynamic stuff like this.

This should be your combo box:

<select onchange="update(this)">
<option>opt1</option>
<option>opt2</option>
<option>opt3</option>
</select>

And your text box:

<input type=text id=text1>

And here's your javascript:

<script language=javascript>
function update(obj)
{
     if(obj.selectedIndex==0)text1.value="Option 1!";
     else if(obj.selectedIndex==1)text1.value="Option 2!";
     else if(obj.selectedIndex==2)text1.value="Option 3!";
}
</script>

HTH,

----------
---Snib---
----------
 
Old February 16th, 2004, 12:02 AM
Authorized User
 
Join Date: Aug 2003
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to spraveens
Default

Thankz A Lot SNIB !!

Actually Iam really fascinated About Open Source and I want to learn PHP/APACHE/MYSQL, Do you know any good site where I can learn Them??

Regards

Praveen

 
Old February 16th, 2004, 10:06 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Praveen,

I also am pretty new to PHP and MySQL, but just go to http://php.about.com and it should do an About search for learning PHP. I did this and found a few that also have MySQL and using it with PHP. This is all aside from these, of course:

http://php.net , the PHP Manual
http://mysql.com , Official Web Site and Manual

Sorry, I don't know much about APACHE...

Hope these sites help you,


----------
---Snib---
----------
 
Old February 16th, 2004, 03:31 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

again, http://www.phpbuilder.com/
       http://www.php.net/links


Take care,

Nik
http://www.bigaction.org/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms and Sub forms Mink Access 1 December 1st, 2004 08:38 AM
Opening forms from other forms Paulsh Access VBA 1 September 30th, 2004 06:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.