Page 1 of 1
Please advise, new to php
Posted: Sat Feb 21, 2009 3:29 pm
by birdy202
Hi,
I'm now trying a hand at php. i have a website and my hosting company provides me with forms but people are able to submit without entering anything into the forms and it goes through. My hosting company provides the codes but i guess it doesn't come with security/restrictions to prevent such abuse. And i don't know how/where to store the database once i create my own forms. I have the entire Adobe Creative Suite and use dreamweaver to design my site. Please give me any advice you may have...i'll really appreciate it.
Thanks in advance.
Re: Please advise, new to php
Posted: Sat Feb 21, 2009 4:46 pm
by watson516
Check the form data before entering it into a db. If it is empty, give an error.
Re: Please advise, new to php
Posted: Sat Feb 21, 2009 6:31 pm
by califdon
That puts you in an awkward spot. Data security on the web is a complicated business, and without spending the time and effort to learn a LOT of PHP, MySQL, HTML, Javascript and general security and web administration skills, I don't know how you can do much of anything besides install well-designed scripts. Personally (and it's only my opinion), I wouldn't use any web creator suites like Adobe or Dreamweaver without a solid background of all those subjects. It's like trying to have a fist fight with somebody in total darkness.
If you decide you want to learn all those subjects, there are lots of good tutorials on the web, and we'll be glad to try to guide you and answer questions that the tutorials don't clarify, but I don't know of any substitute for learning the skills yourself.
Re: Please advise, new to php
Posted: Sat Feb 21, 2009 9:13 pm
by birdy202
Hi, thanks for responding. i know how to use dreamweaver...have been using it for about 2 years now. My only prob is creating forms in php...which i'm willing to learn with tutorials. I've been looking at tutorials on php at W3Schools.com. My concern or i should say question lies in where that database will be going after i've created the forms and also what codes to use to make it secure. The one i use now is directed to my hosting company but i know if i decide to create my own - with better security - i'll need a database or somewhere to send the info.
Re: Please advise, new to php
Posted: Sat Feb 21, 2009 9:37 pm
by califdon
The best I can do is repeat what I already said. I don't doubt that you can use Dreamweaver, but that has very little to do with PHP programming. In fact, again in my opinion, suites like Dreamweaver are an obstacle to learning how to deal with databases or program with PHP, because you're familiar with dragging and dropping and having the software do all the nitty gritty without you even seeing it. Databases can be very complex and any kind of script writing requires completely different skills from designing a nice looking web page. I honestly don't think there's any other way to do it than to spend months or longer studying the basics of database theory and PHP programming. And that's optimistic.
Take a look at some of these references (I wrote the first one):
http://forums.aspfree.com/microsoft-acc ... 08217.html
http://parallel.vub.ac.be/documentation/database/tutor/
http://www.databasejournal.com/sqletc/a ... abases.htm
http://devzone.zend.com/node/view/id/627
http://www.w3schools.com/php/php_intro.asp
Re: Please advise, new to php
Posted: Sun Feb 22, 2009 8:26 am
by birdy202
Thanks for your thoughts. BTW i don't drag and drop stuff in dreamweaver...i create the site in html code and like i said, i'm willing to learn which is why i came to this forum. Perhaps you misread my initial msg...i never said i wanted to use dreamweaver to create php...i only gave that info to allow any potential helpers to see where i was and what i was working with. I KNOW php needs to be created in/with a separate program. All i needed was some tid bits about how to start and any other info i didn't know, not to be drowned in pessimism.
Thanks for your help.
Re: Please advise, new to php
Posted: Sun Feb 22, 2009 6:23 pm
by php_east
birdy202 wrote:My concern or i should say question lies in where that database will be going after i've created the forms and also what codes to use to make it secure. The one i use now is directed to my hosting company but i know if i decide to create my own - with better security - i'll need a database or somewhere to send the info.
forms maybe something you can learn up and master within a short span, as you are already familliar with HTML, so adding php inside the form bit by bit as you go would enable you to progress steadily.
as for the database, first, learn to handle the forms, using POSTs, and retrive the values
in your forms, and reproduce them. when you can do this reliably, you have mastered one part.
Then, take it from the reproduced values, to the mySQL database. that involves a little
mysql sql commands, which is best done by making an separate set of mysql handling routines
as very likely you will be using it often.
browser
Code: Select all
[POST->]
server
[receive POST values (PHP) from HTML Form]
[PHP values]
[do something]
[to mySQL]
[do something]
[PHP ->produce new HTML Form]
[PHP dispatch to browser]
then send me a beer.
Re: Please advise, new to php
Posted: Sun Feb 22, 2009 7:28 pm
by califdon
php_east: nice summary.
Re: Please advise, new to php
Posted: Sun Feb 22, 2009 8:27 pm
by Bill H
Especially the "send me a beer" part.
Re: Please advise, new to php
Posted: Sun Feb 22, 2009 9:00 pm
by califdon
birdy202 wrote:All i needed was some tid bits about how to start and any other info i didn't know.
I hope the links I provided above will get you started. It's a long road and you will be well advised to start at the beginning of it. Whenever you have specific questions, we're here to try to help you.
Re: Please advise, new to php
Posted: Sun Feb 22, 2009 10:00 pm
by birdy202
Thanks php_east for such a simplified summary...dunno abt the beer part but thanks!
And thanks califdon for the links..they've been very helpful!
