updating textbox based off dynamic drop down list from DB

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

Gopesh
Forum Contributor
Posts: 143
Joined: Fri Dec 24, 2010 12:48 am
Location: India

Re: updating textbox based off dynamic drop down list from D

Post by Gopesh »

Ah,great discussions so far...Hope that VFDinc got the idea for solving that pblm.
VFDinc
Forum Newbie
Posts: 10
Joined: Sun Oct 23, 2011 10:54 am

Re: updating textbox based off dynamic drop down list from D

Post by VFDinc »

Everything is working fine. I missed a textarea termination, and threw me off, but now its working.
Thanks for all the help! I am sure I will be posting soon. I am loving this experience to learn PHP/HTML/JS.
VFDinc
Forum Newbie
Posts: 10
Joined: Sun Oct 23, 2011 10:54 am

Re: updating textbox based off dynamic drop down list from D

Post by VFDinc »

You may now resume hijacking my thread :)
User avatar
egg82
Forum Contributor
Posts: 156
Joined: Sat Oct 01, 2011 9:29 pm
Location: Colorado, USA

Re: updating textbox based off dynamic drop down list from D

Post by egg82 »

haha, yeah sorry about that.
Glad you got it fixed, I never would have come up with a solution if you needed some javascript.

Good luck on your project!
mikeashfield
Forum Contributor
Posts: 159
Joined: Sat Oct 22, 2011 10:50 am

Re: updating textbox based off dynamic drop down list from D

Post by mikeashfield »

looks cool
User avatar
manohoo
Forum Contributor
Posts: 201
Joined: Wed Dec 23, 2009 12:28 pm

Re: updating textbox based off dynamic drop down list from D

Post by manohoo »

califdon wrote:I'm afraid that's incorrect. PHP can be embedded anywhere in an HTML document, as long as it is preceded and followed by the opening and closing tags ( <?php and ?> ). It is very common to include several blocks of PHP code at various points within an HTML document.
I have to disagree, create index.html with the following code:

Code: Select all

<html>
  <head>
  <title>test</title>
  </head>
  <body> 
     <?php echo 'hello world!'; ?>
  </body>
</html>
Explain then why the above does not produce any output.
User avatar
egg82
Forum Contributor
Posts: 156
Joined: Sat Oct 01, 2011 9:29 pm
Location: Colorado, USA

Re: updating textbox based off dynamic drop down list from D

Post by egg82 »

HTML header?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: updating textbox based off dynamic drop down list from D

Post by califdon »

manohoo wrote:
califdon wrote:I'm afraid that's incorrect. PHP can be embedded anywhere in an HTML document, as long as it is preceded and followed by the opening and closing tags ( <?php and ?> ). It is very common to include several blocks of PHP code at various points within an HTML document.
I have to disagree, create index.html with the following code:

Code: Select all

<html>
  <head>
  <title>test</title>
  </head>
  <body> 
     <?php echo 'hello world!'; ?>
  </body>
</html>
Explain then why the above does not produce any output.
That works perfectly fine with any server that is configured to interpret PHP and recognize whatever filetype you saved it as. Now, if you want to quibble and say that it doesn't work if you use a filetype that the server isn't configured to recognize, I don't consider that a useful comment. It also wouldn't work if you named it index.txt. Most web servers are configured to recognize .php filetypes, but some sysadmins prefer to recognize other filetypes, too, such as .htm or .html. That's merely an option for the sysadmin. It's not a PHP issue, it's a server configuration issue. The point of my comment was to correct an incorrect statement to the effect that any PHP code had to precede any HTML code in the same file, which is simply not true.
User avatar
egg82
Forum Contributor
Posts: 156
Joined: Sat Oct 01, 2011 9:29 pm
Location: Colorado, USA

Re: updating textbox based off dynamic drop down list from D

Post by egg82 »

and I again thank you, as I learned something that day.

And I just learned something else by reading that, too. You have quite a bit to teach!
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: updating textbox based off dynamic drop down list from D

Post by califdon »

Thank you. I did teach (not programming, but other computer related subjects) in college for about 10 years after I retired from industry. So I would consider myself a failure if I didn't have something to teach. :)
Post Reply