I'm a newbie - contact mgmt system / address book

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
pbsperry
Forum Newbie
Posts: 6
Joined: Thu Aug 15, 2002 1:27 pm

I'm a newbie - contact mgmt system / address book

Post by pbsperry »

I'm trying to create a contact management system that's pretty in depth. I've created a couple scripts & the database, but I need help w/ formatting. Below is the code (I've left out the less relevant code for space' sake)

Code: Select all

//display results	
	echo '<table width="1000" border="0" cellpadding="0" cellspacing="0" mm:layoutgroup="true">';
	echo '<tr><td width="25" height="15" valign="bottom"><div align="left"><strong>First Name: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="35" valign="bottom"><div align="left"><strong>Last Name: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="75" valign="bottom"><div align="left"><strong>Spouse: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="bottom"><div align="left"><strong>Street Address: </td>';	
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="bottom"><div align="left"><strong>City: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="bottom"><div align="left"><strong>State: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="bottom"><div align="left"><strong>Zip Code: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="bottom"><div align="left"><strong>Email Address: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="bottom"><div align="left"><strong>Home Phone: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="bottom"><div align="left"><strong>Work Phone: </td>';
	echo '<td width ="3"></td>';
	echo '<td width="35" valign="bottom"><div align="left"><strong>Birth Date: </td>';
	echo '<td width ="3"></td>';
	echo "</p></strong></tr>";

while ($row = mysql_fetch_assoc($result)) 
&#123; 

	$firstname = stripslashes($row&#1111;'firstname']);
	$lastname = stripslashes($row&#1111;'lastname']);
	$spouse = stripslashes($row&#1111;'spouse']);
	$streetaddress = stripslashes($row&#1111;'streetaddress']);
	$city = stripslashes($row&#1111;'city']);
	$state = stripslashes($row&#1111;'state']);
	$zip = stripslashes($row&#1111;'zip']);
	$email1 = stripslashes($row&#1111;'email1']);
	$homephone = stripslashes($row&#1111;'homephone']);
	$workphone = stripslashes($row&#1111;'workphone']);
	$birthdate = stripslashes($row&#1111;'birthdate']);
	
    // html stuff
	
    echo '<tr>'; 
  	echo '<td width="25" valign="top">'.$firstname.'</td>'; 
    echo '<td width ="3"></td>';
	echo '<td width="35" valign="top">'.$lastname.'</td>'; 
    echo '<td width ="3"></td>';
	echo '<td width="75" valign="top">'.$spouse.'</td>'; 
    echo '<td width ="3"></td>';
	echo '<td width="25" valign="top">'.$streetaddress.'</td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="top">'.$city.'</td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="top">'.$state.'</td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="top">'.$zip.'</td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="top">'.$email1.'</td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="top">'.$homephone.'</td>';
	echo '<td width ="3"></td>';
	echo '<td width="25" valign="top">'.$workphone.'</td>';
	echo '<td width ="3"></td>';
	echo '<td width="35" valign="top">'.$birthdate.'</td>';
	echo '<td width ="3"></td>';
    echo '</tr>'; 
&#125;
You can see the results @ http://www.zeitco.com/results.php

It's pretty ugly. What I'd like to be able to do is have the results display more concisely (it's doing a break in the table cells every time there's a space in the record for some reason). Also, I'd like to 1) be able to sort by any of the column headers, 2) do a search for any of the data in the table, 3) be able to click on any of the people and get more information (found in other tables), and 4) limit entries per page to 10 per page.

It's beyond my current abilities, so I'm asking for help. Thanks
User avatar
llimllib
Moderator
Posts: 466
Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD

Post by llimllib »

You probably want to learn HTML. Click here. Oh, and all I got at your site was an error.
Post Reply