Click to See Complete Forum and Search --> : PHP PROBLEM, With MYSQL and EVERYTHING
damasterjo
Apr 29th, 2006, 12:41 AM
this stuff makes about as much sense as :duck: that smillely. Does anyone have any good recommendations as to where is a good place to start. It seems like SO MUCH to take in! Should I buy a book? I dont know...
penagate
Apr 29th, 2006, 01:05 AM
php.net tutorial (php.net/tut.php)
PHP/MySQL tutorial (freewebmasterhelp.com/tutorials/phpmysql)
That's pretty much the exact path I took.
Understand that MySQL is a common database system and PHP provides an integration layer with it, that is implemented on just about all webservers running PHP.
If you want to see an example of how they work together on your own computer, check out xampp (apachefriends.org/xampp.html). It is a very neat and easy to install development web server which includes PHP 5 and MySQL 4.
damasterjo
Apr 29th, 2006, 01:49 AM
thanks these are way better than the ones I have been looking at. Much simpler!
damasterjo
Apr 29th, 2006, 09:12 PM
http://www.freewebmasterhelp.com/tutorials/phpmysql/2
This is what im trying to do, I am a little confused though, I cant get mysql to work... I dont know if the PHP it is talking about is for in the mysql or on a webpage? I am stuck! My site does support everything, I am using PHP my admin... and help would be appreciated!
penagate
Apr 30th, 2006, 12:39 AM
Oh yes. Ignore that part. Set up your database and tables through phpMyAdmin, it's easier.
Unless you're building a portable PHP application, there's not really any need to create a database through PHP, unless you have no other way.
visualAd
Apr 30th, 2006, 03:43 AM
php.net tutorial (php.net/tut.php)
PHP/MySQL tutorial (freewebmasterhelp.com/tutorials/phpmysql) ...
I wouldn't recommend that tutorial. They have escaped none of their variables, never check that calls to mysql_query() are successfull, use <? ?> instead of <?php ?> to embed script and worst of all, none of their code is indented.
penagate
Apr 30th, 2006, 03:49 AM
I pretty much just skimmed through it to get the gist of how it worked, without really noticing those details.
There are a lot of those tutorials but I don't know any outstanding ones. Maybe one of us should write one and chuck it in the Utilitybank/Tutorials here.
damasterjo
Apr 30th, 2006, 08:11 AM
Oh yes. Ignore that part. Set up your database and tables through phpMyAdmin, it's easier.
Unless you're building a portable PHP application, there's not really any need to create a database through PHP, unless you have no other way.
It has to be portable... Being that it is a resturant and we sometimes get new items or the prices change...
So basically can I set up or do I set up the database right from the web page? Or ok scratch that.... Well I dont know
Ok maybe I can initally set up all the fields with php admin. But then I will need the web site to access these values, and displlay things according to what is in the database. I will need a software program in vb on the resturant end, that will have access to the database too and be able to change things, such as to tell the database if we are out of stock...
And if you dont recommend that tutorial, which one do you...?
damasterjo
Apr 30th, 2006, 08:19 AM
http://questfor3d.com/phptest.php
look at the error there, what am I doing wrong, you can view the source...
EDIT: ok now it i guess is trying to connect correctly, but it says access denied, any ideas?
john tindell
Apr 30th, 2006, 08:46 AM
The errors means that PHP is have problems connecting to the MySQL server, make sure that you have MySQL running on the server. For more info check out:
http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html
Or if you don't have access ask your hosting company.
damasterjo
Apr 30th, 2006, 08:48 AM
Or if you don't have access ask your hosting company.
I did :D They brought me to a great help page. I could not use the localserver, I had to specify, but now the access is denied :eek: :( dont know why...
penagate
Apr 30th, 2006, 08:50 AM
It has to be portable... Being that it is a resturant and we sometimes get new items or the prices change...
Portable means the application can be deployed on multiple web servers. I got the impression that wasn't the case.
damasterjo
Apr 30th, 2006, 08:52 AM
Portable means the application can be deployed on multiple web servers. I got the impression that wasn't the case.
Ok whatever, :confused: Im so confussed :confused: And why am I denied access to my own database :mad:
john tindell
Apr 30th, 2006, 09:00 AM
ok one step at a time. You need to make sure you are using the right username and password. This may be differnet from the set you use to FTP to your hosting. If you are 100% you're using the right set then badger your host until they change the permissions on your MySQL User so you have access.
damasterjo
Apr 30th, 2006, 09:09 AM
http://questfor3d.com/phptest.php
getting farther... talking to godaddy about it... there arent helping too much though :(
damasterjo
Apr 30th, 2006, 10:12 AM
http://questfor3d.com/phptest.php
YES!!!!! NO ERRORS!
I just found out that godaddy does not support remote access, does this mean I cant access the database from a vb program?
john tindell
Apr 30th, 2006, 10:18 AM
Yes, basically, there are loads of reasons why they don't allow remote access, search the forum and visualAd pointed out loads.
How ever if you want a MySQL database to test VB apps on then there was a guy who offered a free MySQL database with remote access for testing apps, but it was very limited.
damasterjo
Apr 30th, 2006, 10:23 AM
i asked this before, but then can i print straight from the site? on our computers, or could I email something, and have the program recognize it then print?
john tindell
Apr 30th, 2006, 10:26 AM
What is it that you want to print, and do you want to print it instantly? You could write a program that querys a PHP page, which provides the infromation that needs to be printed. So the PHP would generate an XML file with all the information in and your program would parse that and print the correct information.
damasterjo
Apr 30th, 2006, 03:09 PM
i need to print an order that the person submited...
XML? what you said sounds like what I would like to accomplish, and yes it NEEDS to be as instant as it can get. Time is on the line... So I dont know anything about xml or nothing. So help for that would be great... :)
john tindell
Apr 30th, 2006, 03:27 PM
Well as far as time goes you can just set the the program to check for updates as often as you want, 30secs, 1 minute, 3 minutes etc.
What language are you using to write the program? Because you could use web services with PHP as a way of communicating with the website and the program.
If you don't then you could just use standard HTTP requests to manage state of the data request.
Basically XML is just a way of handling data. There are classes that can be used from PHP will generate the XML from your data which can be parsed by your applicaiton later.
http://us3.php.net/manual/en/ref.xml.php is a good place to start for generating the XML from PHP.
http://www.w3schools.com/xml/ is a good tutorial for getting to know XML.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.