A user-accessible address book using php?

This is a discussion on A user-accessible address book using php? within the PHP Language forums, part of the PHP Programming Forums category; Hello All, I still can't figure it all out. I am trying to create a web page (using php) ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-28-2004
truckmen
 
Posts: n/a
Default A user-accessible address book using php?


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


Reply With Quote
  #2 (permalink)  
Old 12-28-2004
Scott Orsburn
 
Posts: n/a
Default Re: A user-accessible address book using php?

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@spam_maclaunch.com

Reply With Quote
  #3 (permalink)  
Old 12-28-2004
truckmen
 
Posts: n/a
Default Re: A user-accessible address book using php?

***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


Reply With Quote
  #4 (permalink)  
Old 12-28-2004
Pedro Graca
 
Posts: n/a
Default Re: A user-accessible address book using php?

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
http://www.php.net/manual
http://www.php.net/manual/en/tutorial.php
http://www.php.net/mysql


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 :-)



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 http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!
Reply With Quote
  #5 (permalink)  
Old 12-28-2004
Scott Orsburn
 
Posts: n/a
Default Re: A user-accessible address book using php?

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@spam_maclaunch.com

Reply With Quote
  #6 (permalink)  
Old 12-30-2004
Kenneth Porter
 
Posts: n/a
Default Re: A user-accessible address book using php?

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.

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:59 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0