GetDotted Domains

Viewing Thread:
"SQL database"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Mon 07/04/14 at 10:59
Regular
Posts: 12
Anyone happy in building PHP based SQL database? About to do this however wish to be sure all I need is in the Freeola software?
Tue 05/08/14 at 15:59
Regular
Posts: 12
Thanks again JTD and Hmmm

Will check out details which look great and let you know how I progress.

Excellent examples!
Tue 05/08/14 at 14:53
Regular
"Ctrl, Alt, Woof"
Posts: 212
I'd forgotten I also wrote a couple of responses here for another member with a similar question.

Combined with the MySQL posts it should get you on the way.


Also, please don't take this the wrong way but if you don't know where to start with PHP then 'PHP For Dummies' was a big help when I started learning database driven sites.

Also, also, I use a really neat free program called 'HeidiSQL' to manage my MySQL databases from my desktop. A quick search should find the site to download it from.


JTD
Tue 05/08/14 at 08:54
Moderator
"Are you sure?"
Posts: 5,000
Rollo wrote:
I normally use Microsoft Web Expression 4 to build most websites and in the past Front Page. Can I still do this? Even with PHP?


Yes Expression Web 4 supports PHP.


[s]Hmmm...[/s]
Mon 04/08/14 at 22:21
Regular
"Feather edged ..."
Posts: 8,536
Rollo wrote:
How do I link best PHP to my normal HTML coding?

Apologies for these silly simple questions however again I think I am missing a crucial and possibly very simple first step?


This might be very useful so read and inwardly digest :¬)
Mon 04/08/14 at 17:17
Regular
Posts: 12
Thanks again JTD

I will start working along the lines you describe.

Great examples again!

Another question though:

I normally use Microsoft Web Expression 4 to build most websites and in the past Front Page. Can I still do this? Even with PHP?

Or should I use another web program?

Or will everything I need be within Freeola setup software?

How do I link best PHP to my normal HTML coding?

Apologies for these silly simple questions however again I think I am missing a crucial and possibly very simple first step?

Thanks again for all your valued help.

Any further comments most welcome.
Mon 04/08/14 at 13:42
Regular
"Ctrl, Alt, Woof"
Posts: 212
Rollo wrote:
Thanks JTD

Will this be hidden from users as they should only see their own part of the database? Assuming so as it is PHP code?


Yes, your connection details are hidden. Anything between the markers is treated as code and is hidden from source views... unless of course that code produces HTML elements, in which case they will be treated as standard HTML.

I like to put my connection details in a separate file and 'include_once' it in any pages I load which needs to connect.

and


Also I am correct in thinking I can setup a table for users which can contain a username and password for each?


yes, that is correct too.
Set up a new table called 'users' for example and include fields for Name, username and password, along with any other details you need to collect (email address is always a good one in case you need to validate/send a forgot password email).

Then you need to create a page with a form, then either write a php script (or find one on-line) to validate the submitted username/password details against the database.

It's also advisable to check for 'hacking' code in the username and password submissions. Use something like this when getting the submitted details:


$username = mysql_escape_string($_REQUEST['username']);


..to remove the basic hacking strategies.

I also store passwords as an MD5 hash to keep them safe in case the db is compromised.


So.. to summarise:
- create a user table.
- create a landing web page.
- add a user validation form to that web page.
- upon submission of the form valid the user credentials against the user table (using escape_string).
- if a record is matched then do something, otherwise do something else.
- consider adding functions to add, update, delete accounts.
- consider adding password username reminder page too.
Mon 04/08/14 at 11:55
Regular
Posts: 12
Thanks JTD

The examples are excellent however still have a question?

I wish to set up the database so that users can access with username and password securely. I see that initially the Freeola username and password are in the PHP coding to allow website to start and function. Will this be hidden from users as they should only see their own part of the database? Assuming so as it is PHP code?

Also I am correct in thinking I can setup a table for users which can contain a username and password for each?

Many thanks again for help to date.

Any comments welcomed.
Fri 18/07/14 at 20:34
Regular
"Ctrl, Alt, Woof"
Posts: 212
HI,

Check these out. They should get you started with the basics. I'm not sure if any example pages are still valid.

Part One

Part two

JTD
Fri 18/07/14 at 11:54
Regular
Posts: 12
Hi all, as suggested more info about what I wish to do:

I tried to set up a very simple database as a test for example create a file with 3 fields and add say 5 records.

Ideally I wished to use PHP to introduce the Database Creation by a few echo strings describing the Title and Fields.

I did try VIP and SQL with Freeola however it did not seem to work?

Possibly I am missing a very simple first step!!

Any ideas on how and where to put this simple code (I think) would be gratefully received.

Many thanks in anticipation.
Sat 12/04/14 at 20:31
Regular
"Feather edged ..."
Posts: 8,536
;¬)

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Great services and friendly support
I have been a subscriber to your service for more than 9 yrs. I have got at least 12 other people to sign up to Freeola. This is due to the great services offered and the responsive friendly support.
Second to none...
So far the services you provide are second to none. Keep up the good work.
Andy

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre
Feedback Close Feedback

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.