Professional Web Applications Themes

How to let user search for phone number, address, etc. - Macromedia Dreamweaver

I think I have been making this too complicated. I have a spreadsheet containing names, phone numbers, addresses, etc., of family members. I would like to let other family members log onto the web site (using a password), then search for the address, etc. of anyone else in the family. With my word processing background I'm thinking: database. But maybe that's too complicated. I have been reading about XML and it seems it would not be too hard to organize the family addresses using it. But how would I handle the search and display part? I've been worrying about PHP ...

  1. #1

    Default How to let user search for phone number, address, etc.

    I think I have been making this too complicated.

    I have a spreadsheet containing names, phone numbers, addresses, etc., of
    family members. I would like to let other family members log onto the web
    site (using a password), then search for the address, etc. of anyone else in
    the family.

    With my word processing background I'm thinking: database. But maybe
    that's too complicated. I have been reading about XML and it seems it would
    not be too hard to organize the family addresses using it. But how would I
    handle the search and display part? I've been worrying about PHP and MySQL
    and all those things, but maybe those are overkill? Would it be a
    combination of CSS (for display of result) and XML and . . . what? a
    programming language that hunts for the sought string and pulls up the
    requested data?

    I kind of asked this question a couple of days ago, but, as I said, I think
    I may have been making it too complicated. In spite of all my library
    books, I'm having trouble "getting" the programming part of this.

    Thanks for any suggestions that would point to a simple, baby-step kind of
    solution.

    Bonnie





    Bonnie In Sacramento Guest

  2. #2

    Default Re: How to let user search for phone number, address, etc.

    What kind of server are you running on? I'd say the easiest would be a
    database solution...easiest to setup and to program against. If your on a
    Windows server that supports ASP development..go with that and VBScript as
    the language. Within a week of trial-and-error I'd say you'd get a good
    grasp to do what you need, using DWMX and the ASP/VBScript server model,
    very little handcoding.

    --
    Ron


    Ron Guest

  3. #3

    Default Re: How to let user search for phone number, address, etc.

    Thanks, Ron, but the server uses Linux and does not support ASP. Also, I am
    using DW 4, not MX (don't know whether that makes any difference). I have
    located a sort of tutorial/program at topxml using VB to search for records
    from XML and am groping around with that right now. My host does support
    MySQL, SQL and PHP, but again I am not sure how to hook them up with each
    other.

    Compared to this, CSS seems easy! ;-)

    Bonnie


    "Ron" <ron0079spamaol.com> wrote in message
    news:beqk3e$6d4$1forums.macromedia.com...
    > What kind of server are you running on? I'd say the easiest would be a
    > database solution...easiest to setup and to program against. If your on a
    > Windows server that supports ASP development..go with that and VBScript as
    > the language. Within a week of trial-and-error I'd say you'd get a good
    > grasp to do what you need, using DWMX and the ASP/VBScript server model,
    > very little handcoding.
    >
    > --
    > Ron
    >
    >

    Bonnie In Sacramento Guest

  4. #4

    Default Re: How to let user search for phone number, address, etc.

    >My host does support
    > MySQL, SQL and PHP, but again I am not sure how to hook them up with each
    > other.
    Hmmm...I have 0 experience with MySQL/PHP combination. You mentioned in your
    post some code you found on at topxml.com, I'm pretty sure that code will
    work on Windows only because the majority of code there uses Microsoft
    object libraries like MSXML, which need to be installed on the server. If
    you have Windows at home, you'll get it to work, but trying it on a Linux
    server probably won't work. The only alternative I can think of is to find
    some Javascript that ps an xml file for search criteria but I think
    thats going to be hard to find.

    In my opinion, the database would be the best route, even if you've never
    had exposure to them. Dreamweaver 4 won't help you out much with web
    applications, but learning how to hand-code will be beneficial.

    In response to not knowing how they hook up to each other..heres a short
    explanation (probably not going to be short):

    A database backed web application needs 3 components:
    1 - The database management system (MySQL for the Unix world, SQL Server for
    the Windows world: Note those are just 2 alternatives)
    2 - The frontend application (The pages you design)
    3 - The server side language (PHP for Unix, VBScript for Windows)

    Now, the server side language is what ties the database to the frontend.
    This code is usually written in the html page itself, and delimited by
    certain tags (like <% %> in ASP). When the server encounters those tags..it
    realizes it needs to process code and do what the code says. The code will
    usually do these things to display a set of records
    1. Open a connection to my database
    2. Retrieve a certain group of records
    3. Display each record on my page

    Knowing what certain group of records to retrieve is done with SQL Query
    language. The database system knows how to interpret SQL, and the developer
    knows how to write it. The server side language just sends it back and forth
    between developer and database:

    1. Open the connection
    2. SELECT * FROM Addresses WHERE FirstName ='Ron'
    3. Display the results

    In VBScript, those steps would look similiar to this:

    <%
    ' Step 1
    Dim addressRecords
    Set addressRecords= Server.CreateObject( "ADODB.Recordset" )
    addressRecords.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=c:\addresses.mdb"
    ' Step 2
    addressRecords.Source = "SELECT * FROM Addresses WHERE FirstName='Ron'"
    addressRecords.Open
    ' Step 3
    While Not addressRecords.EOF
    Response.Write addressRecords.Fields.Item("Street")
    addressRecords.MoveNext
    Wend
    %>

    I don't know how that would look in PHP. You might want to download the
    trial MX and see how easy PHP development is in it. If you work hard, at the
    end of 30 days you might know enough to begin hand-coding the server
    language.

    --
    Ron


    Ron Guest

  5. #5

    Default Re: How to let user search for phone number, address, etc.

    Ron,

    Thanks so much for your detailed explanation. I think I know where to
    start...may put the whole XML idea on hold for awhile and tackle PHP/MySQL
    for now.

    Thanks again!

    Bonnie


    "Ron" <ron0079spamaol.com> wrote in message
    news:bescmb$5c9$1forums.macromedia.com...
    > >My host does support
    > > MySQL, SQL and PHP, but again I am not sure how to hook them up with
    each
    > > other.
    >
    > Hmmm...I have 0 experience with MySQL/PHP combination. You mentioned in
    your
    > post some code you found on at topxml.com, I'm pretty sure that code will
    > work on Windows only because the majority of code there uses Microsoft
    > object libraries like MSXML, which need to be installed on the server. If
    > you have Windows at home, you'll get it to work, but trying it on a Linux
    > server probably won't work. The only alternative I can think of is to find
    > some Javascript that ps an xml file for search criteria but I think
    > thats going to be hard to find.
    >
    > In my opinion, the database would be the best route, even if you've never
    > had exposure to them. Dreamweaver 4 won't help you out much with web
    > applications, but learning how to hand-code will be beneficial.
    >
    > In response to not knowing how they hook up to each other..heres a short
    > explanation (probably not going to be short):
    >
    > A database backed web application needs 3 components:
    > 1 - The database management system (MySQL for the Unix world, SQL Server
    for
    > the Windows world: Note those are just 2 alternatives)
    > 2 - The frontend application (The pages you design)
    > 3 - The server side language (PHP for Unix, VBScript for Windows)
    >
    > Now, the server side language is what ties the database to the frontend.
    > This code is usually written in the html page itself, and delimited by
    > certain tags (like <% %> in ASP). When the server encounters those
    tags..it
    > realizes it needs to process code and do what the code says. The code
    will
    > usually do these things to display a set of records
    > 1. Open a connection to my database
    > 2. Retrieve a certain group of records
    > 3. Display each record on my page
    >
    > Knowing what certain group of records to retrieve is done with SQL Query
    > language. The database system knows how to interpret SQL, and the
    developer
    > knows how to write it. The server side language just sends it back and
    forth
    > between developer and database:
    >
    > 1. Open the connection
    > 2. SELECT * FROM Addresses WHERE FirstName ='Ron'
    > 3. Display the results
    >
    > In VBScript, those steps would look similiar to this:
    >
    > <%
    > ' Step 1
    > Dim addressRecords
    > Set addressRecords= Server.CreateObject( "ADODB.Recordset" )
    > addressRecords.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=c:\addresses.mdb"
    > ' Step 2
    > addressRecords.Source = "SELECT * FROM Addresses WHERE FirstName='Ron'"
    > addressRecords.Open
    > ' Step 3
    > While Not addressRecords.EOF
    > Response.Write addressRecords.Fields.Item("Street")
    > addressRecords.MoveNext
    > Wend
    > %>
    >
    > I don't know how that would look in PHP. You might want to download the
    > trial MX and see how easy PHP development is in it. If you work hard, at
    the
    > end of 30 days you might know enough to begin hand-coding the server
    > language.
    >
    > --
    > Ron
    >
    >

    Bonnie In Sacramento Guest

  6. #6

    Default Re: How to let user search for phone number, address, etc.

    Bonnie In Sacramento wrote:
    > I think I have been making this too complicated.
    >
    > I have a spreadsheet containing names, phone numbers, addresses, etc., of
    > family members. I would like to let other family members log onto the web
    > site (using a password), then search for the address, etc. of anyone else in
    > the family.
    > Thanks for any suggestions that would point to a simple, baby-step kind of
    > solution.
    Unless your family isn't a clan of millions spread all over the globe,
    you can esily add a simple javascript search function. There are several
    free and commercial available at [url]www.hotscripts.com[/url]

    --
    Dan Vendel - *GOF*
    [url]http://www.vendel.info[/url]
    Contact me directly by clicking here:
    [url]http://contact.vendel.info[/url]
    Formmail tutorial:
    [url]http://www.vendel.info/tut/formmail.html[/url]
    Nested table demonstration:
    [url]http://www.vendel.info/tabletut/[/url]

    Dan Vendel *GOF* Guest

  7. #7

    Default Re: How to let user search for phone number, address, etc.

    Thanks for the sympathy and encouragement, Ron. I've downloaded and
    installed mySQL, PHP and Sambar and am working my way through a tutorial
    downloaded from Sitepoint. You're right about the learning being
    addictive--that's why, Dan, I'm going to learn this database stuff instead
    of finding a javascript that would maybe do the job. I want to learn how to
    do it the "right" way in case I need to do something more complex later on.
    Goofy, eh?

    Thanks again . . . I love this NG! 8-)

    "Ron" <ron0079spamaol.com> wrote in message
    news:besgqe$ac2$1forums.macromedia.com...
    > > I think I know where to
    > > start...may put the whole XML idea on hold for awhile and tackle
    PHP/MySQL
    > > for now.
    >
    > Good luck with it...I think some sound advice to keep in mind is that
    > everyone had to start not knowing anything. Experience comes with
    > perserverance, practice, and trial and error. I took a QBasic course in
    > school once, and did not know what the heck I was doing declaring and
    > writing all these sub routines, defining types and parameters...had no
    clue
    > at all. I used alot of examples on the web to write a payroll system, but
    in
    > the end I still didn't know what happened. By sticking to it though, one
    day
    > things just clicked at all made sense..literally it just fell into place
    in
    > an instant. I believe that is true for anyone who perseveres through what
    > they are trying to understand. When that happens, you'll be greatful, and
    > find yourself addicted to learning as much as possible...that when it gets
    > fun.
    >
    > Since I have no experience with PHP/MySQL, I'd pretty much be starting at
    > the same point your on, it might get frustating at times and seem
    > impossible, but I think its supposed to be like that...at those times I
    just
    > walk away from the computer for a bit...that usually happens about 5 to 10
    > times a day depending on what I'm working on.
    >
    > I would start by installing the necessary components on my machine (MySQL,
    > PHP)...and begin from there with simple tutorials on data retrieval and
    > display with little emphasis on how it looks.
    >
    > --
    > Ron
    >
    >

    Bonnie In Sacramento Guest

  8. #8

    Default Re: How to let user search for phone number, address, etc.

    You'll probably want to get a decent editor versus Notepad and DW's code
    view. I would probably try this one:

    [url]http://www.webattack.com/get/topphp.shtml[/url]

    and see how I like it for a few days. I also found a site of interest for
    php development:

    [url]www.phpfreaks.com[/url]

    packed with tutorials, forums.

    --
    Ron


    Ron Guest

Similar Threads

  1. Global Address/Phone/SSN[Country ID]
    By Kamaluokeakua in forum ASP.NET Building Controls
    Replies: 4
    Last Post: October 2nd, 12:59 PM
  2. [PHP] Reformatting phone number string from user input
    By Verdon Vaillancourt in forum PHP Development
    Replies: 1
    Last Post: August 10th, 06:43 PM
  3. Reformatting phone number string from user input
    By Verdon Vaillancourt in forum PHP Development
    Replies: 1
    Last Post: August 10th, 06:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139