Jump to content

[SOLVED] Form Data


zenix

Recommended Posts

Hello, I have been working hard this past year trying to learn php and mysql. I've even developed my own little database of contacts. Anyway, I thought it'd be neat (if possible) to have a textarea on the page my data form is on to display the first, last names and phone numbers of the contacts in the db, then have it so all I have to do is scroll through the list and click the one I'd like to have displayed in my form.. I don't know how to do this. My database works great, I just thought this could facilitate a little more learning...and it would be a nice addition.

 

If anyone has any idea on how I might achieve this I'd really appreciate it if you'd let me know. Thanks!!

Link to comment
https://forums.phpfreaks.com/topic/176200-solved-form-data/
Share on other sites

I appreciate your input, thank you. My problem isn't the database...I have THAT working quite well. I would just like to see if I can have the names and maybe phone number of the contacts displayed in a text box so I can click on one and have all the information (address, phone, email etc...) appear in the form.

Link to comment
https://forums.phpfreaks.com/topic/176200-solved-form-data/#findComment-928557
Share on other sites

PHP is a server side scripting language and cannot effect anything client side. Ajax is basically a technique that allows JavaScript to communicate with PHP to sort of fake a true synchronous communication. You will not be able to do it without using Ajax unless your ok with submitting a form everytime you wish to change the page. You wouldn't really want to design it in a way that would have you clicking in a textbox, you'd really want either a search box you type in or a dropdown box.

Link to comment
https://forums.phpfreaks.com/topic/176200-solved-form-data/#findComment-928621
Share on other sites

A textbox should really be used for inputing or editing text. If you wanna display text, just use plain text. If you wanted a list of items to select from and a dropdown box isn't the look your after you could have a list of anchor links (<a hrefs) or whatever. Either way, symanically or asthetically a textbox really isn't a good way to have a menu per-se.

Link to comment
https://forums.phpfreaks.com/topic/176200-solved-form-data/#findComment-928638
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.