Re: [PHP-DB] html input element rendering html entities

2009-07-16 Thread Maureen Biorn
Govinda wrote: I've got a form that loads and saves product data to mysql. In some fields like the heading and subhead we use special characters like Omega, Registered Trademark, and Ampersand. When putting the data in I will encode them as Omega;, etc. Once saved, all is good, everything goes

Re: [PHP-DB] displaying info in a form

2002-03-29 Thread biorn
I have come across this before. Make sure you put around the value field and then single quotes around the variable, ie. tdinput type=text value=?php echo '$tracking_num' ? /td tdinput type=text value=?php echo '$id' ? (NOTE: if this is an int value, you do not need to use the single

Re: [PHP-DB] Array HELL!!!!

2002-02-25 Thread biorn
Try putting the hidden element statement down inside the while loop in he second page, but change it to INPUT TYPE=\hidden\ NAME=\id[]\ VALUE=\$id\ and add $id=$row['id']; before it. I will show below where it should go. HTH MB jas [EMAIL PROTECTED] said: I have made the changes you

Re: [PHP-DB] Passing contents of array on as variables...

2002-02-25 Thread biorn
Let's see what your code looks like now and where it is returning the word array. That might help determine where the problem lies now. MB jas [EMAIL PROTECTED] said: Ok to this point I have been able to query a database table, display the results in tables and within a form. As of yet I

Re: [PHP-DB] Passing contents of array on as variables...

2002-02-25 Thread biorn
You didn't add the value part of the hidden element, ie. INPUT TYPE=\hidden\ NAME=\car_type\ value=\$myrow[car_type]\ You were naming the field as an array with no value. if you want to pass this as an array of values, you would need to use: INPUT TYPE=\hidden\ NAME=\car_type[]\

Re: [PHP-DB] Passing contents of array on as variables...

2002-02-25 Thread biorn
When you call your $car_type in the second page, you need to set a variable starting at 0 and call it as $car_type[0] and loop through all of the values in the array. ie. $i=0; while ($car_type[$i]) { I have added more code below that should help. MB jas [EMAIL PROTECTED] said: Yeah,

Re: [PHP-DB] Passing contents of array on as variables...

2002-02-25 Thread biorn
One problem I see is that you are sending all of the values for all of your fields (except the id field) from the first page to the second page, not just the ones that are checked, so even if it was working properly, you would get a list of all items in the table, not just the checked items.

Re: [PHP-DB] Re: Associating table id...

2002-02-22 Thread biorn
All you need to do is assign the variable (let's call it $id) the id for that record set from the database. Then pass this variable to the next page for the delete. You may want to search for the mysql_fetch_array function on php.net. This would be used to grab the record set from the

Re: [PHP-DB] Array HELL!!!!

2002-02-22 Thread biorn
Ok, you have almost got it. I have made little remarks further down in your code which should just about do it for you. jas [EMAIL PROTECTED] said: I don't know what it is but I am having a hell of a time trying to get some results of a query setup into an array or variable (too much of a

Re: [PHP-DB] Parse Error

2002-02-21 Thread biorn
Is $cars an array field? If not, you are trying to compare $cars to an list/array of values (I am not sure this would work even if $cars was an array field) 'WHERE $cars = $car_type\,\$car_model\,\$car_year\,\$car_price\,\$car_vin\,\$dlr _num\);'. Normally, you would have to compare each

Re: [PHP-DB] Parse Error

2002-02-21 Thread biorn
According to your code, if the checkbox next to the word 'remove' is checked, then the value of $cars passed to the form is checkbox. Then in the done2.php3 page, you are trying to delete where checkbox='array of values listed'. Is there a field in your database called checkbox? If so,

Re: [PHP-DB] debugging?

2002-02-21 Thread biorn
Here is what your delete statement should look like: $sql = mysql_query(DELETE FROM $table_name WHERE id = '$id',$dbh) or die(mysql_error()); Note the field name without the $ in front of it and the variable you are comparing it to with the $. One other note, in your table, you have id as a

Re: [PHP-DB] debugging?

2002-02-21 Thread biorn
Your $sql already contains a mysql_query. Why are you running it against it again, unless you have changed something. If $sql only contains your delete statement(without calling mysql_query), then do not put quotes around $sql,$dbh Otherwise, come back with what $sql and $dbh are assigned to

Re: [PHP-DB] query error...

2002-02-05 Thread biorn
Try putting single quotes around your variables in your update statement instead of the escaped double quotes, they are easier to read. Also, were you wanting to update all entries in that table to the same, c_name, s_addy, city, state, zip and phone? If not, you will need to add 'where

Re: [PHP-DB] SELECT statement does not return rows

2002-02-01 Thread biorn
Is your id an integer or a char/varchar? If it is an integer, take the quotes off $id in your select statement. Todd Williamsen [EMAIL PROTECTED] said: Weird.. I want to be able to edit records, which I have done in the past, and I cannot see why it isn't working... I have tried

Re: [PHP-DB] Select statement only returns 1 record

2002-01-30 Thread biorn
++; } ? Also, without the value in the option tag, you will not be passing anything to the form. HTH Maureen Biorn Todd Williamsen [EMAIL PROTECTED] said: I am trying to get data from two columns, FirstName and Last name and displaying all the records LastName, FirstName in a drop down menu

Re: [PHP-DB] PHP query on date field

2001-10-30 Thread biorn
Isn't date a reserved word that should not be used as a field name? It appeared that what was asked was if he should change the name of his field from date to date_1. It should definitely be changed if it is now called date. Jason Wong [EMAIL PROTECTED] said: On Wednesday 31 October 2001

Re: [PHP-DB] HELP PLEASE!! Get query error when inserting into MySql

2001-10-29 Thread biorn
If any of the values you are trying to insert are not integers, you need to put single quotes around the variables, ie. $SCRIPT_NAME, $date, $BName, etc in the insert statement. Robby Whiteside [EMAIL PROTECTED] said: Hi There, I have a query whenever I try to insert something into a

Re: [PHP-DB] Re: NEWBIE - Needs Assistance with Joins

2001-09-17 Thread biorn
You should not need the extra semicolon in there to complete the SQL statement. All you need is the one at the end. Vera Algoet [EMAIL PROTECTED] said: Cecily, I'm sure you probably heard from others about your parse error. I know it looks weird, but you need to have two semicolons, so

Re: [PHP-DB] example of making Next 10 entries - previous ..

2001-08-29 Thread biorn
Here is an excellent example at PHPBuilder (a great site for finding tutorials) http://www.phpbuilder.com/columns/rod2221.php3 HTH Maureen Andrius Jakutis [EMAIL PROTECTED] said: Hello, I need example of making simple thing: to list only 10 entries per page, and next 10 is shown

Re: [PHP-DB] Re: PHP4, MySQL, errors....

2001-08-10 Thread biorn
It appears that the error is pointing to the last line of your code (just by a quick count of the lines). This normally means that you are missing a closing bracket somewhere in your code.In glancing through your code, the first while statement has an opening, but no closing bracket (unless

Re: [PHP-DB] Problem importing large db to mysql in windows

2001-08-01 Thread biorn
if that fixes it. You may need to restart the server that PHPMyAdmin is running on to get it to register. Let us know if it still does not work. Thanks. Maureen Biorn Doug Schasteen [EMAIL PROTECTED] said: I'm running a local web server for development on my Win ME machine using apache

RE: [PHP-DB] Problem importing large db to mysql in windows

2001-08-01 Thread biorn
look somewhere else for the problem. Maureen Biorn Doug Schasteen [EMAIL PROTECTED] said: It works great! However, even though my .sql file was only 2.4 mb, it took nearly 15 minutes to import it all. I expect to be working with 20mb files in the not too distant future. Will it really take

Re: [PHP-DB] MySQL Error???

2001-06-28 Thread biorn
Most likely, your id (index, auto-increment field, whatever it is) data type is tinyint which only goes to 127. Brian Grayless [EMAIL PROTECTED] said: Is anyone familiar with this MySQL error? 1062: Duplicate entry '127' for key 1 I wrote a great bookmark management program that works

Re: [PHP-DB] Data errors in entering

2001-05-21 Thread biorn
The problem is in your insert statement. You forgot the $ on your month and year variable values. Your statement should read: $sql = INSERT INTO $table_name (day,daydate,month,year,time,place,numbers, details,reportby) VALUES