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
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());
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
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
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
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
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
>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
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
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
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
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,
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.
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
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
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
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
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
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
>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
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
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
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
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
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
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
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
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
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
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/)
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
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
() 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
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
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
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
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
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
38 matches
Mail list logo