Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

A user-accessible address book using php?

 
   Database Forums (Home) -> PHP RSS
Next:  Access 97 to Access 2000 and Switchboard Problems  
Author Message
ralphbohm

External


Since: Dec 28, 2004
Posts: 2



(Msg. 1) Posted: Tue Dec 28, 2004 1:40 pm
Post subject: A user-accessible address book using php?
Archived from groups: comp>lang>php (more info?)

Hello All,


I still can't figure it all out.

I am trying to create a web page (using php) where:

1) A visitor add his or her name to an address book that can also be
viewed online by other visitors to the website.

In creating this, I will also need to:

2) Allow that visitor to create a username and password to add his/her
information.

3) Allow that visitor to make changes and updates to his or her entry in
future visits to the website.

and...

4) Create an automated system for that user to retreive his/her username
and/or password if s/he has forgotten it.

Boy oh boy, would I be happy just to be able to make step #1 a reality.
Can anyone please help me with this? I am leasing space from Aitcom and my
server is a Linux system. I have MySQL and PHP available to work with.


I have an example in mind. The following website is another school very
similar to ours in Maine, and they have a system in place almost exactly
as I'd like to create:

http://www.mmaaa.org/:)

Most Sincerely,
Ralph M Bohm
Maine Maritime Academy

 >> Stay informed about: A user-accessible address book using php? 
Back to top
Login to vote
scottso_no

External


Since: Dec 09, 2004
Posts: 3



(Msg. 2) Posted: Tue Dec 28, 2004 3:37 pm
Post subject: Re: A user-accessible address book using php? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

truckmen wrote:

 >I am trying to create a web page (using php) where:
 >
 >1) A visitor add his or her name to an address book that can also be
 >viewed online by other visitors to the website.
 >
 >In creating this, I will also need to:
 >
 >2) Allow that visitor to create a username and password to add his/her
 >information.
 >
 >3) Allow that visitor to make changes and updates to his or her entry in
 >future visits to the website.
 >
 >and...
 >
 >4) Create an automated system for that user to retreive his/her username
 >and/or password if s/he has forgotten it.
 >
 >


Using a database backend is likely the best thing to do. It adds a new
set of requirements to the server and application but would be well
suited for the task.


--
Scott Orsburn
scottso_no RemoveThis @spam_maclaunch.com

 >> Stay informed about: A user-accessible address book using php? 
Back to top
Login to vote
ralphbohm

External


Since: Dec 28, 2004
Posts: 2



(Msg. 3) Posted: Tue Dec 28, 2004 4:40 pm
Post subject: Re: A user-accessible address book using php? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

***Using a database backend is likely the best thing to do. ***
***It adds a new set of requirements to the server and application but
would be well suited for the task. ***

Not sure what you mean by database backend.

I still must try to understand how to integrate an Excel file that has
names already listed with the various cells.

I have not seen this file yet nor have I begun to understand just how
integrate it into theis system. Am I on the right track though?

Ralph
 >> Stay informed about: A user-accessible address book using php? 
Back to top
Login to vote
hexkid1

External


Since: Nov 13, 2004
Posts: 34



(Msg. 4) Posted: Tue Dec 28, 2004 6:40 pm
Post subject: Re: A user-accessible address book using php? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

truckmen wrote [lines edited and re-ordered]:
 > I still can't figure it all out.
 >
 > I am trying to create a web page (using php) where:
 >
 > 1) A visitor [to the website can view an] address book.

 > I have MySQL and PHP available to work with.

After a visit to the manual
<a rel="nofollow" style='text-decoration: none;' href="http://www.php.net/manual" target="_blank">http://www.php.net/manual</a>
<a rel="nofollow" style='text-decoration: none;' href="http://www.php.net/manual/en/tutorial.php" target="_blank">http://www.php.net/manual/en/tutorial.php</a>
<a rel="nofollow" style='text-decoration: none;' href="http://www.php.net/mysql" target="_blank">http://www.php.net/mysql</a>


start with this:

<?php
define('DBHOST', 'localhost');
define('DBUSER', 'nobody');
define('DBPASS', 'password');
define('DBDATA', 'address');

echo '<h1>Address book view</h1>';
echo '<table>';

$conn = mysql_connect(DBHOST, DBUSER, DBPASS)
or die('Cannot connect: ' . mysql_error());
mysql_select_db(DBDATA) or die('Cannot select the DB.');
$sql = "select * from addressbook order by name LIMIT 20";
$res = mysql_query($sql) or die('Query error: ' . nysql_error());
while ($row = mysql_fetch_array($res)) {
echo '<tr>';
foreach ($res as $value) {
echo '<td>', $value, '</td>';
}
echo '</tr>';
}
mysql_free_result($res);
mysql_close($conn);

echo '</table>';
?>


 > [The visitor can add addresses to the database]

and this (with an appropriate form):

<?php
$name = $_POST['name'];
$address = $_POST['address'];
$sql = "insert into addressbook (name, address) values('$name', '$address')";
mysql_query($sql) or die('Query error: ' . mysql_error());
?>

 > In creating this, I will also need to:

Hey!, start easy Smile



Or there's always the option of a pre-made script and tailoring
it to your needs.
--
Mail to my "From:" address is readable by all at <a rel="nofollow" style='text-decoration: none;' href="http://www.dodgeit.com/" target="_blank">http://www.dodgeit.com/</a>
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" )
may bypass my spam filter. If it does, I may reply from another address!
 >> Stay informed about: A user-accessible address book using php? 
Back to top
Login to vote
scottso_no

External


Since: Dec 09, 2004
Posts: 3



(Msg. 5) Posted: Tue Dec 28, 2004 6:57 pm
Post subject: Re: A user-accessible address book using php? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

truckmen wrote:

 >***Using a database backend is likely the best thing to do. ***
 >***It adds a new set of requirements to the server and application but
 >would be well suited for the task. ***
 >
 >Not sure what you mean by database backend.
 >
 >I still must try to understand how to integrate an Excel file that has
 >names already listed with the various cells.
 >
 >


truckmen, can you describe your level of knowledge about PHP and what
you're trying to do so that I don't assume too much? We need to be sure
you're comfortable with the tools you're trying to use. It will help a
bunch. For example, in your original post you mentioned a public
address book. However, Excel will not be a factor other than this is
apparently what the data was collected with. Instead, your data will be
stored in a database and accessed using PHP (server-side) and a web
browser (client-side). Any "integration" with Excel will be a text file
export of the database at best.


--
Scott Orsburn
scottso_no.TakeThisOut@spam_maclaunch.com
 >> Stay informed about: A user-accessible address book using php? 
Back to top
Login to vote
Kenneth Porter

External


Since: Apr 17, 2004
Posts: 18



(Msg. 6) Posted: Wed Dec 29, 2004 7:13 pm
Post subject: Re: A user-accessible address book using php? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

All the features you describe are things that any bulletin board system
provides. So go take a look at the source to one of those and see how they
do it.
 >> Stay informed about: A user-accessible address book using php? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
What php book to use? - I would appreciate if somebody could recommend a good book or other resources on PHP which would be easy to follow and to understand; and which would help to build a web application from beginning to end. I have programming logic experience and know..

Can I learn PHP 5 with PHP 4 book? - Hi I would like to learn PHP and I know we are at version 5. A friend let me use 2 of his books but they cover PHP 4. Is that ok for starting to learn the language? Or should I go straight with a PHP 5 book ? Thanks a lot Patrick

Detect MAC address with PHP - Is there some way can detect MAC address with PHP? any help will be appreciate. Ben

ip address of client - Hi I was using the following script to get ip address of client, but I get Welcom ::1 from the following script. How to get the real ip address? <?php function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet...

Guest-book with admin options! - Please, help me to find freeware PHP5 Guest-bbok script with administration functions: meaasages can be shown JUST after moderator agree. Without any smiles, posts by blocks on page(listings), input inside guestbook.html-file, base thingies like..
   Database Forums (Home) -> PHP All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]