Jump to content

Recommended Posts

I have been learning some mysql and decided to just see if I could make a decent script using php and mysql so I came up with the idea of making an online address database called Addy Online.

I have tested most things and believe everything is working but I just wanted you guys to see what you though of it and if it runs fine. You can find the database at www.lszanto.com/addyonline/ and the login is username - admin, password - password.

You can also download and install the script from www.lszanto.com/addyonline.zip I have included a readme file just to see if the instructions are clear on how to install.

Please post what you think and if I could improve it because I believe I will make a newer version soon with a search and different ways to order address's and such.
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/
Share on other sites

Looks great actually. CSS-based layout, clean appearance, user customizable styles, and it works! The margin at top is a little big for my taste, just a personal thing. Depending on your experience, you could add a little JS to edit addresses in-place on that table, that would be slick. I didn't see it on there, but you're definitely planning on adding a search feature right? It might be fun to play with some MySQL stats too, like how many people in the address book have gmail accounts, live in CA, etc. Looks like a great start and a fun project!
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-150642
Share on other sites

I just tested it out, mark@mark.mark lol

I havent looked at the code but just from my one entry I do have a few suggestions.

You should include the edit feature in the address list, that way the user doesnt have to get the name exactly right to edit it. I added "Mark" twice and then I did the search to edit and it brought up both results - thats kinda kludgy to me.

I tried to add a username like this "<script>alert()</script>" it doesnt input it - thats awesome, but your error page doesnt follow your styling.

Maybe you should set some standard fields for your addresses just so that you can make them searchable/sortable at a later date

I will play around with it some more and give more impressions later, but it does work well. good work

Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-150659
Share on other sites

Yeah, it is kinda odd how it just puts out,
[code]
Not Acceptable
An appropriate representation of the requested resource /addyonline/addaddress.php could not be found on this server.
[/code]

The average user would sit there wondering what they did wrong...

Also, are the addresses in any order at all?  The phone number can be all letters which is kinda odd... But besides that it's great!
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-150941
Share on other sites

Just got curios and downloaded the source...

I suggest you add the nav thing to a file and include it so that if you want to change it you dont have to alter every file.  Also, a small error, but in runonce you have
[code=php:0]
$database = "addyonline";

//Connect to mysql, don't edit below here.
mysql_connect($host, $username, $password) or die(mysql_error());

//Tell user results.
echo "\n\nConnected to mysql.<br />\n";

//Query to create database.
$databasesql = "CREATE DATABASE `addyonline` DEFAULT CHARACTER SET ascii COLLATE ascii_bin";
[/code]

Wouldn't really cause problems, but might confuse some users when they change the DB name and it still creates addyonline lol...

Also, if you want to get really specific, you should define a primary key in the admin table (doesn't really matter unless you add multiple user support in a later version)

I don't think it really matters, but can I ask why the charset ascii?

When I put <script>alert();</script> into a field when i was running it on my local server, it went through and inserted into the DB...

Maybe in addaddress.php add

[code=php:0]
if(get_magic_quotes_gpc()) {
$addslashes = 0;
}
foreach($_GET as $k => $v) {
str_replace("<", "&lt;", $v);
str_replace(">", "&gt", $v);
if($addslashes != 0) {
$_GET[$k] = addslashes($v);
}
}
}
[/code]

Also I personally would like to make a user input data instead of making it unknown lol... Atleast make them put in a name IMO.

Additionally I suggest using POST instead of GET... I like to use GET only on relatively small data...

Also you should put connect.php in a .htaccess protected folder or check the URI or something so that a user can't spam that page possibly causing problems with mysql although the chances are small and php auto closes mysql connections...

Oh and if you do use addslashes you're going to want to stripslashes() on the view page...
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-151008
Share on other sites

A few things:

1) I think you'd probably want more input fields to give it a little more depth.
2) Make it a little more user friendly and add 2 columns to the display table to allow users to click on a record directly to edit/delete.
3) make the table a little more readable and alternate the row background color.
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-151711
Share on other sites

You might want to disable changing the password... Someone changed it again... Anyways, can I ask what the purpose of this script is?

Since only the admin can add info is it supposed to be used for like a personal address book?  Or whats a practical use of this?

There maybe something I'm missing completely with the uses though...
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-152720
Share on other sites

I love it, I can't see it, but I like it, I tried it a minute earlier.  Iw ould like a chance to be able to login, if you don't mind.  After you fix it, since you have it available for download, where is a page that give's information on new version releases.  I like it, and want to give it a try, I was just about to create one, to keep track of client information, this'll save me some work.
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-152903
Share on other sites

  • 2 weeks later...
Hi everybody,

first of all: Don't kill me. I am a newbie to PHP and mySQL. :o)

a) Do I get support/help here regarding "Online Addy"?

b) cant get it run. After the /install/ it keeps telling me I had an error in my database. But, 2 forums run fine on this mySQL DB-Server (puretec.de)

c) I can't find the "/install/runonce.php"... in /install/ there is an "index.php" only.

anxious looking forward to your replies,
I cant wait to have Online Addy running :)
Martin.
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-160610
Share on other sites

I am a tiny step ahead...

I downloaded the ZIp-File again and "boom" the "runonce.php" was there". In the script I filled out hostname, dbname and password. Now it tells me this:

"Connected to mysql.
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARACTER SET ascii COLLATE ascii_bin' at line 1".
Link to comment
https://forums.phpfreaks.com/topic/32426-address-database/#findComment-160624
Share on other sites

  • 3 weeks later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.