Current location: Hot Scripts Forums » Programming Languages » PHP » Navigation idea


Navigation idea

Reply
  #1 (permalink)  
Old 09-28-09, 08:41 AM
zenix zenix is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Navigation idea

Hello, I have been learning php/mysql for about a year now and have made some pretty decent progress. I've made a database for a fake company in order to practice what I have learned. Well, I came up with an idea I thought would be kind of neat. I have my database working well. I thought it'd be convenient if there was a way for me to have a text box at the top of the form containing first name, last name and phone numbers for each entry in the database, so I can scroll through, find the one I want and then click it to have all the info displayed in the form.

I have first and last names, address 1 and 2, city, state, zip, phone and email. Has anyone got any idea how I might achieve this? I've been studying AJAX for all of about a month now...it seems as though this would make sense. Am I at least warm?

Thank you very much for your time!
Reply With Quote
  #2 (permalink)  
Old 09-28-09, 11:21 AM
ruteckycs's Avatar
ruteckycs ruteckycs is offline
Coding Addict
 
Join Date: Jul 2009
Posts: 377
Thanks: 6
Thanked 10 Times in 10 Posts
Use drop downs instead of a textbox
__________________
This post was created with 100% recycled electrons.
Reply With Quote
  #3 (permalink)  
Old 09-28-09, 11:46 AM
zenix zenix is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Thank you, my hang up is I haven't got a clue as to how to even start populating any sort of box with the data. Any guidance would be SO appreciated.
Reply With Quote
  #4 (permalink)  
Old 09-28-09, 05:58 PM
ruteckycs's Avatar
ruteckycs ruteckycs is offline
Coding Addict
 
Join Date: Jul 2009
Posts: 377
Thanks: 6
Thanked 10 Times in 10 Posts
PHP Code:

<?php

include("connect.php");

$result mysql_query("SELECT * FROM Catagory ORDER BY Catagory ASC"); 

echo 
"<select name=\"MyDropDown\">";
while(
$row mysql_fetch_array$result )) {
    
$MYData=$row['MyROW'];
        echo 
"<option>$MYData</option>";
}
echo 
"</select>";
?>
Not tested but should be fine. Connect.php is your include to connect and select database, replace MyROW with your field name.
__________________
This post was created with 100% recycled electrons.
Reply With Quote
The Following User Says Thank You to ruteckycs For This Useful Post:
zenix (09-29-09)
  #5 (permalink)  
Old 09-29-09, 06:45 AM
zenix zenix is offline
Newbie Coder
 
Join Date: Jun 2009
Posts: 37
Thanks: 1
Thanked 0 Times in 0 Posts
Thank you for your advice, I really appreciate you having taken your time to assist me. I will learn a lot from this!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
idea box mrmaxey Script Requests 1 06-30-07 12:44 AM
Magical appearing navigation kjmatthews CSS 3 04-01-06 01:38 PM
Xml Driven flash navigation arbel Script Requests 0 12-14-03 12:50 PM
From idea to inception at zero cost !!! JasonD General Advertisements 0 06-06-03 03:37 PM


All times are GMT -5. The time now is 08:00 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.