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

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: 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

[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

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 think

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

2002-08-03 Thread Rich Hutchins
for your query then use something like this to do it: $result = mysql_query($query) or die(Query failed: $querybr . mysql_error()); If the query fails mySQL will tell you where your error is. -- JJ Harrison [EMAIL PROTECTED] Rich Hutchins [EMAIL PROTECTED] wrote in

[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 input 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

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 select only passes the value, I'll have to rethink my use of the control. Thanks, John. -Original Message- From: John W. Holmes [mailto:[EMAIL

[PHP-DB] RE: Play wav files

2002-10-04 Thread Rich Hutchins
. -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 ( To unsubscribe

[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,

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

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

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

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
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

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: -Original Message- From: John Coder [mailto:[EMAIL PROTECTED]] Sent: Friday, December 27, 2002 2:09 PM

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

RE: [PHP-DB] Mysql Passwprd validation

2003-01-03 Thread Rich Hutchins
Check this resource: 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

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

RE: [PHP-DB] php variables to JS

2003-01-05 Thread Rich Hutchins
.\. etc... -Original Message- From: Rich Hutchins [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 05, 2003 9:35 AM To: Bruce Levick; [EMAIL PROTECTED] Subject: RE: [PHP-DB] php variables to JS From what I have learned PHP and JS don't talk directly to each other. Instead, you have

[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

RE: [PHP-DB] Query with optional params

2003-01-05 Thread Rich Hutchins
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 Cc: [EMAIL PROTECTED

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

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] 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?

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

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, June

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. -Original

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

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: (particularly good) What you'll find is that JS does not

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

RE: [PHP-DB] Newbie help

2003-09-06 Thread Rich Hutchins -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

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

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

RE: [PHP-DB] PHPMysqlAdmin

2004-11-27 Thread Rich Hutchins
Sourceforge... -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

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] 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