View Full Version : DataBase Coding
mikeyoung1
07-21-2003, 07:20 PM
I am an old Clipper programmer. I have converted most of my applications over to C++ with Windows but have stayed with the DBF files. I an currently producing some basic html pages and using Javascript functions which are very much like C. I now need to do some database work. i.e. allow my users to id themself and then present them with choices based on their ID. Can I do this on the server side with JavaScript?, If so should I?.
Any suggestions will be greatly appreciated.
tia
mike young
Database-interaction will always involve server side scripting (thank God for that. Imagen if it could be done clientsided ...)
Server side JavaScript ? The closest i know to that, is using Jscript as scripting-language inside ASP pages.
If you are familiar with C, then getting the basics of PHP wount take more then a day or so.
I found this q good MySQL-PHP get-going ttorial
http://www.mysql.com/articles/ddws/index.html
But if you run a search in the PHP or ASP orum or on google, plenty of tutorials will turn up.
You need some sort of profile-checker system. When the client logs in, you select his userprofile from the db and store it in a sessionvariabel. Then before printing a new page, you check which actions are allowed for that user, and only print the links to these action. The same before loading a page : check if his profile is high enough to access this page.
mikeyoung1
07-22-2003, 05:46 PM
raf,
Thank you for the reply. Is your suggestion to use mysql with php based on cost, ease of use or that it is just the best way to go?
thx
mike young
Thank you for the reply. Is your suggestion to use mysql with php based on cost, ease of use or that it is just the best way to go?
Well, MySQL is free, stable and fast + a lot of hosting companys support it (dito for usersupport :) )
PHP : you mention you know some C, so the syntax will be familiar. Even without programming experience, it only takes a few days to get the basics down and write your first pages.
PHP - MySQL is quite a good and often used combination. Like most people in this forum will also know some PHP and most host will support both + you can use Apache. Windows hosting is always a lot more expensive.
I used to write ASP, but switched to PHP cause it's cheaper (hosting) has more possibilitys, more built in functions (image generation, file uploading, mailing, working with PDF's, ...) where ASP requires some (commercial) components etc
Oh yeah, easy to use : There are a lott of db-fronts for MySQL (like phpMyAdmin)
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.