Re: [PHP-DB] basic form entry

2007-10-07 Thread Rich Hutchins
If you are still having issues with this, try echoing out your query to the browser before sending the query to the database. Once you do that, you can look at the query that will be sent to the database. If there is an error there, you can fix it. If not, you can rule out your query string as t

RE: [PHP-DB] MySQL Update Quandry

2005-11-26 Thread Rich Hutchins
Please forgive me as I've been working with C# recently so my PHP is a little rusty. But if I'm reading this correctly... If your query fails outright, your function is going to return false: "if (!(@ mysql_query($query, $connection))) { $this->errors = array(mysql_errno(), mysql_error());

RE: [PHP-DB] Complicated Question (maybe)?

2005-01-11 Thread Rich Hutchins
If I understand your original question properly, you want to have an address field that a user can see sometimes and not others? Why not add a single column to your user table, something like see_address and make it hold the results of a yes or no checkbox that only you can see on a user's profile

RE: [PHP-DB] PHPMysqlAdmin

2004-11-27 Thread Rich Hutchins
Sourceforge... http://sourceforge.net/projects/phpmyadmin -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, November 27, 2004 1:28 PM To: PHP DB Subject: [PHP-DB] PHPMysqlAdmin Where can you get PHPmysqladmin? I would like to load it on my test server

RE: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread Rich Hutchins
The apostrophe (') in your data is, most likely, killing the SQL statement when it is sent to the server. Use addslashes() around all of your form data to prevent this and also to help guard against SQL injection attacks. Ex: $add = "INSERT INTO movies SET movie_name='".addslashes($movie

RE: [PHP-DB] No data being put into the DB

2004-03-03 Thread Rich Hutchins
Robert, I'm assuming that you have an open database connection and that you have just omitted it from your post for convenience sake. I'll keep looking at your code, but my first suggestion would be for you to echo $addtocart before you submit it to the database. This will show you the exact quer

RE: [PHP-DB] Newbie help

2003-09-06 Thread Rich Hutchins
http://www.php.net/manual/en/install.windows.php -Original Message- From: Nicola Hartland [mailto:[EMAIL PROTECTED] Sent: Saturday, September 06, 2003 4:29 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Newbie help I need some help to install and configure php I have tried downloading it a d

RE: [PHP-DB] What happens when the database is down?

2003-07-19 Thread Rich Hutchins
>C'mon, think about it. Right on, Miles. Hanxue, One other thing to consider is if you're using the @ in front of your mysql function calls in PHP (e.g. @mysql_connect()). Especially if you're using the @ without and additional error checking with things like: if (!$dbconnect) { die (sp

RE: [PHP-DB] PHP, MySQL and Flash

2003-07-09 Thread Rich Hutchins
Randy, There ARE javascript solutions for this and a few can be found here: http://www.webreference.com/programming/javascript/dragdropie/ http://www.walterzorn.com/dragdrop/dragdrop_e.htm http://www.webreference.com/dhtml/column7/ (particularly good) What you'll find is that JS does not natively

RE: [PHP-DB] Auto inc in MySQL

2003-07-09 Thread Rich Hutchins
Tristan, It is a simple question and the answer be found very easily in the MySQL manual. All you need to do is to create a column in your table of type AUTO_INCREMENT. Then, when you insert a row into the table, you simply insert NULL as the value for the auto-incremented column and it will be au

RE: [PHP-DB] Report

2003-06-28 Thread Rich Hutchins
The links below should give you a wealth of information about reporting tools and php. http://marc.theaimsgroup.com/?l=php-db&w=2&r=1&s=reports&q=b http://www.phpclasses.org/search.html?words=reports&go_search=1 http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=reporting+tool+php -Origin

RE: [PHP-DB] PHP transfer variable question?????

2003-06-14 Thread Rich Hutchins
Sorry, bass-ackwards. 4.2.x+ ships with register_globals set to ON, not OFF. So you'd have to change the setting to register_globals=OFF for your existing code to work. Sorry for any confusion. Rich -Original Message- From: Rich Hutchins [mailto:[EMAIL PROTECTED] Sent: Saturday,

RE: [PHP-DB] PHP transfer variable question?????

2003-06-14 Thread Rich Hutchins
The default installation of PHP 4.2.x+ now ships with register_globals set to OFF in PHP.ini. You have two choices: 1. Change all of your variable references to $_POST['varname'] (or $_GET['varname']). In your case it looks like you'd need $_GET['id']. 2. Turn register_globals ON in your PHP.ini.

RE: [PHP-DB] need to pass info in URL

2003-03-09 Thread Rich Hutchins
Usually, setting the method property to GET in your HTML form will do the trick. It will cause all of the values in that particular form to be passed along in the URL. It's a really basic HTML concept. Not sure if you're looking for something else though since this is a PHP-DB mailing list? -O

RE: [PHP-DB] Is my Hosting service full of it?

2003-02-09 Thread Rich Hutchins
Beyond inspecting the posted code, are there any quality FREE tools that can monitor MySQL resource usage? I searched Google using "mysql resource tools" and came up with a number of tools, but all required payment. I'm figuring that if you run a monitor while testing your code locally, you'll be

RE: [PHP-DB] check box help

2003-01-30 Thread Rich Hutchins
If I understand your question correctly, you really don't have to do much to accomplish what you're looking to do. If you name your checkboxes as an array ($myCheckboxes[]) then, when the form data is submitted, all of the $myCheckboxes[] will be passed as an indexed array called, surprisingly enou

RE: [PHP-DB] Query with optional params

2003-01-05 Thread Rich Hutchins
wrong way logically or if I just wasn't getting the syntax right. I'll code this up and things should be just fine from there. Thanks again for your time. Rich -Original Message- From: David Smith [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 05, 2003 5:33 PM To: Rich Hutchins

[PHP-DB] Query with optional params

2003-01-05 Thread Rich Hutchins
I have a search page on which I place six fields into which users may enter data to perform a search. For ease of explanation, the fields are: Part Number Title Subtitle Print Date Status Type All of these fields reside in the same table, named docmeta, in a MySQL database. I'm running into a log

RE: [PHP-DB] php variables to JS

2003-01-05 Thread Rich Hutchins
One minor error I found upon re-reading is that I neglected to assign a name to the hidden field in HTML. Without doing so, the JS statement wouldn't work. So, the hidden field would actually need to look like this: echo "". etc... -Original Message----- From

RE: [PHP-DB] php variables to JS

2003-01-05 Thread Rich Hutchins
>From what I have learned PHP and JS don't "talk" directly to each other. Instead, you have to make hidden fields in your html that hold the values from your database then access those hidden fields with JS. If you want to take values from JS and use them in a PHP script, then the process is revers

RE: [PHP-DB] Mysql Passwprd validation

2003-01-03 Thread Rich Hutchins
Check this resource: http://www.mysql.com/doc/en/Passwords.html Rich -Original Message- From: Sabina Alejandr Schneider [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 8:48 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Mysql Passwprd validation Hello to everybody!! I'm writing to

RE: [PHP-DB] The ability of accessing DB

2002-12-28 Thread Rich Hutchins
What kind of warning? What kind of db? What are you trying to accomplish on your page? -Original Message- From: midheart [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 28, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] The ability of accessing DB Het, all: Now, I have some q

RE: [PHP-DB] a newbie in deep need for help

2002-12-27 Thread Rich Hutchins
Aha! John, you're right. I remember stumbling over this the first time I used it. Sorry for any confusion, Ehab. More info here: http://www.php.net/manual/en/function.mysql-result.php -Original Message- From: John Coder [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 2:09 PM T

RE: [PHP-DB] A newbie in deep need for help

2002-12-27 Thread Rich Hutchins
Yes, first you use: $result = mysql_result($query2); That will return something like resourceID #3. That's right. What you need to do now is to use a function to access the resource. For example, if you have a table named User with the following columns: ID username passwd and you want to perfor

RE: [PHP-DB] What is a "wrong parameter count" error mean?

2002-12-27 Thread Rich Hutchins
Usually it means that you're not passing the expected number of arguments to a function. For example, the substr() function takes a minimum of two, maximum of three parameters: the string to search, the start position and the length of the substring to return. To correctly use the function, you

RE: [PHP-DB] A newbie in deep need for help

2002-12-27 Thread Rich Hutchins
Nope. Use this statement: $result = mysql_query($query2); The mysql_query() function actually performs the query to the db for you and returns a "resource" with your result set contained within. The mysql_result() function extracts the contents of a given cell from your result set; it does not a

RE: [PHP-DB] small database

2002-11-12 Thread Rich Hutchins
As you'll probably see in a lot of responses, it might be better to store the pictures in a folder on the server and store only the path to the pictures in the db. That keeps the size of the db smaller. If you choose to do that, use an HTML form with enctype="multipart/form-data" and an input typ

RE: [PHP-DB] file upload and php (Not a begginer question!)

2002-10-15 Thread Rich Hutchins
Have you considered some kind of solution using FTP? I don't know exactly how you would integrate that with PHP, but it's an option that is more suited to transferring large files. You might be able to set up a link from one of your pages and use PHP and/or a database solution to authenticate the

[PHP-DB] Array Initialization

2002-10-13 Thread Rich Hutchins
Please forgive me ahead of time, but I didn't want to subscribe to the high-vol general list for a single question. Actually, I need this to prep data to be passed to a db, so it's kind of close. I have a variable number of hidden fields being passed from page A into page B via POST. On page B, I

[PHP-DB] RE: Play wav files

2002-10-04 Thread Rich Hutchins
post. -Original Message- From: zhamrock [mailto:[EMAIL PROTECTED]] Sent: Friday, October 04, 2002 1:22 AM To: Rich Hutchins Subject: Play wav files can anyone help me to play wav files in my page? i'm using apache+php4 TIA' zham -- PHP Database Mailing List (http://www.php.net/)

RE: [PHP-DB] Pulling apart select list elements

2002-10-03 Thread Rich Hutchins
John is right, of course, I was only getting the value. I had it bass-acwards in the original post. Since the end-all answer is that the only passes the value, I'll have to rethink my use of the control. Thanks, John. -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED]] Se

[PHP-DB] Resubmit on page refresh.

2002-09-17 Thread Rich Hutchins
I have a page that maintains a very simple list of items. The page shows the current items on the list and provides an field for the user to add new items to the list. Everything works great. The only problem I'm having is that each time the user clicks the Refresh button on the browser, I get th

RE: [PHP-DB] Re: Addslashes in SQL Statement - SOLVED

2002-08-03 Thread Rich Hutchins
() once. > > also make a variable for your query then use something like this to do it: > > $result = mysql_query($query) or die("Query failed: $query" . > mysql_error()); > > If the query fails mySQL will tell you where your error is. > > > -- > JJ

RE: [PHP-DB] problem getting form input field to become part of query statement

2002-08-03 Thread Rich Hutchins
Try referencing the $listbox variable in you SQL statement like this: $sql = "insert into ".$listbox." values(NULL,'$date','$exercise','$reps','$comments')"; I'm guessing that it might also work like this: $sql = "insert into '$listbox' values(NULL,'$date','$exercise','$reps','$comments')"; I

[PHP-DB] Addslashes in SQL Statement

2002-08-01 Thread Rich Hutchins
I have been wrestling with this off and on for the past couple days and would really appreciate some help. I have a "Guest Book" page that collects name, address, e-mail, etc. in a form. I won't post the form code because it's just HTML and it works fine. Besically, the page does one of two thing

RE: [PHP-DB] Build-up of MySQL Sessions

2002-07-09 Thread Rich Hutchins
Check out this link for an explanation of the mysql_pconnect funtion: http://www.php.net/manual/en/function.mysql-pconnect.php It explains what a persistent connection is and how it "thinks". Unless you have a legitimate need for a persistent connection, try using mysql_connect(). It stays open un

RE: [PHP-DB] passing variables from one page to another

2002-07-08 Thread Rich Hutchins
Just wanted to eliminate one possible problem area. If the query works, then the problem must be in the PHP or the HTML. What do you see if you right click and view source on the blank page you get? If you see something there, copy it into a reply. Might be nothing important, but it'll show us wha

RE: [PHP-DB] Retrieving/Displaying hyperlinked images with PHP

2002-07-07 Thread Rich Hutchins
Just in case you were still looking for info on your question, I've put all of the code from a page I have working that does pretty much what you're looking for. I'm no guru, but the code is commented pretty well. The page does a little more than what you have mentioned you're looking for, but may