Re: [PHP-DB] php mail problem.
check errors from sendmail/qmail or your mail client... Darren Stock a écrit : Hi, I cannot get the php mail function to work from a web browser, if I run my script from the linux prompt, containing the mail function, it runs fine, it sends the mail. But If I run it through my browser it doesn't come back with any errors, it just doesn't send the mail. my php.ini file is ok, as it sends the mail from the prompt. Is this a browser or webserver problem? I interrogated my mail server, and it doesn't even receive an email message. im running apache with php on Mandrake 8.2 any help would be appreciated. -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Changing from Windows to Linux
teoretical no, practical yes. Philip Yeo a écrit : Hi there, I'm curious to find out whether changing one's php development OS from Windows to Linux would affect the performance of the application? Philip -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] mysql tables
hi how many columns can have a mysql table? tnx -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Checking for data on a form
use if($var=) or if(trim($var)=) dengach a écrit : I am using a form to enter data into a mySQL database all is fine but, I need to check for blank entries in rows. I was trying to use isset($var) but it appears to return a TRUE whether or not I insert data on the form. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Efficien search queries
hi do you use OR and AND ? select * from table where pasta like %spagetti% or pasta like %macaroni% ? eat pasta type fasta a écrit : I have simple db wik names, links and short (less then 1000 chars) descriptions. I do offer a search (with the select like %variable% method) but it seems to be very dumb, on single phrases it goes fine on combined it it very bad. Is there a way (link, advice) to spicy it up a bit so the user can get more out of it each time. Thanks in advance. R --__-__-__ eat pasta type fasta -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Closing curly brackets?
a good tutorial for code formating is c and c++ style guides ( http://www.cs.umd.edu/users/cml/cstyle/ ) a good code editor is vim (http://www.vim.org). Jennifer Downey a écrit : Thank you Paul, I have asked about atutorial on proper code formatting and got back a tutorial that was extremely hard to understand. While lots of people have screamed at me for my coding format no one has supplied an understandable answer. That is until this morning. The first thing you should do is properly indent your code. If you do so, you'll be sure to find the missing bracket. Basically, for each new block, tab out again. Thought that was the best tutorial I could ever get. Short and sweet and oh so easy to understand. I am using HTML_Kit as it has the same features as all the othere editors (color coding and such) but it also has a lot more. I can get plugins for anything I would ever need. Except a formatting tutorial ;) Thank for your help Jennifer Paul Burney [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 4/12/02 11:15 PM, Jennifer Downey at [EMAIL PROTECTED] appended the following bits to my mbox: I believe it has something to do with the first while statement's closing curly bracket placement but I can't seem to get it in the right place. Hi Jennifer, The first thing you should do is properly indent your code. If you do so, you'll be sure to find the missing bracket. Basically, for each new block, tab out again. It really helps to use a programmer's editor with syntax highlighting like vim or BBEdit. Here's an example using your code: === $id = $HTTP_GET_VARS[id]; $query = SELECT id, name, image, quantity, type FROM {$config[prefix]}_my_items WHERE uid={$session[uid]} ORDER BY id; $ret = mysql_query($query); while($row = mysql_fetch_array($ret)) { $iid = $row['id']; $image = $row['image']; $name = $row['name']; $quantity = $row['quantity']; $type = $row['type']; if ($iid == $id) { $display_block =CENTERimg src=$image border=0brfont size=2$nameBR$quantityBR$type/font/CENTER; echo $display_blockBRBR; if ($type == food) { //if book or weapon is present then set an option and include in the form later $thisoption=OPTION VALUE=\feed\Feed my pet\n/OPTION; } else { //if any other type is present then set a blank $thisoption=;} } // end option if statement } // end id if statement /* More code after this point */ } // end while if statement. === Hope that helps. Sincerely, Paul Burney http://paulburney.com/ ?php while ($self != asleep) { $sheep_count++; } ? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Delete from mysql table is there a way to....
your posts are here. i don't think you could do this in other way. if is possible i'm curios about it too. Jennifer Downey a écrit : Hi all, I'm not sure if my first post showed up so I am going to post it again and I apologize if it shows up twice. Is there a way to delete a record from a mysql table without fragmenting the db? Here is the query I am using and it does a horrible job. Fragment city. if ($quantity == 0) { $gone = mysql_query(DELETE FROM {$config[prefix]}_my_items WHERE uid={$session[uid]} AND id = '$item'); } Thanks Jennifer -- The sleeper has awaken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Not displaying all records
$row returns an array, and you display only the first element Jennifer Downey a écrit : Hi all, I had to re-write this so it would at least show something on the page. $query = SELECT id, name, image, quantity FROM {$config[prefix]}_my_items WHERE uid={$session[uid]} ORDER BY id; $ret = mysql_query($query); $row = mysql_fetch_array($ret); $id = $row['id']; $image = $row['image']; $name = $row['name']; $quantity = $row['quantity']; $display_block .=img src=$imagebr$nameBR$quantity; echo $display_block; I know there are 2 records in the table but it will only display the first. What have I done wrong? Thanks Jennifer --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] No results from query
Lisi a écrit : That worked...why? because in your table you wrote _SPACE_Hatzoloh_SPACE_ or _NEWLINE_Hatzoloh_NEWLINE_ ...any way you wrote Hatzoloh and some caracter that you don't see it so easy (space, tab, new_line). % is like * on regular expresion (wildcard) -Lisi At 09:23 AM 4/9/02 +0300, Marius Ursache wrote: Lisi a écrit : I have the following query: SELECT * FROM ayny WHERE organization LIKE 'Hatzoloh' try SELECT * FROM ayny WHERE organization LIKE '%Hatzoloh%' which produces no results, when I set $numrows = mysql_num_rows($result); it equals 0. When I do the following: SELECT * FROM ayny and then loop through the results, echoing them to the screen with the following code: while ( list($key,$val) = each($result_array) ) { echo $key = $valBR; } I do get a line organization = Hatzoloh So why can't I pull just the record for Hatzoloh using my first query? Please let me know if you need more code to figure this out. Thanks, -Lisi -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Forms and mysql
Jennifer Downey a écrit : If you had read more carefully you'd see that I don't have THE email sent to me. The replies were never in the archives. I guess since I am a woman everyone feels they need to send private email instead of replying with a post. maybe... maybe not... on my NS when i press reply he tries to reply to sender, not to [EMAIL PROTECTED] ... Jennifer Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Friday 05 April 2002 07:55, Jennifer Downey wrote: Hi all, I know I've asked this before and wouldn't be asking again if I had the email that you people replied back with. Windows took a you know what on me and I had to format the hard drive. If this has been answered before then search in the archives: http://marc.theaimsgroup.com/?l=php-db -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* If Love Were Oil, I'd Be About A Quart Low -- Book title by Lewis Grizzard */ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Forms and mysql
if you have full access to internet (no proxy or something) try to search on news servers (alt.php or oher php related newsgroups) news server: news2.euro.net or other... Jennifer Downey a écrit : In any case the email or replies are not in the archives. I have searched them and came up empty. Marius Ursache [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Jennifer Downey a écrit : If you had read more carefully you'd see that I don't have THE email sent to me. The replies were never in the archives. I guess since I am a woman everyone feels they need to send private email instead of replying with a post. maybe... maybe not... on my NS when i press reply he tries to reply to sender, not to [EMAIL PROTECTED] ... Jennifer Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... On Friday 05 April 2002 07:55, Jennifer Downey wrote: Hi all, I know I've asked this before and wouldn't be asking again if I had the email that you people replied back with. Windows took a you know what on me and I had to format the hard drive. If this has been answered before then search in the archives: http://marc.theaimsgroup.com/?l=php-db -- Jason Wong - Gremlins Associates - www.gremlins.com.hk /* If Love Were Oil, I'd Be About A Quart Low -- Book title by Lewis Grizzard */ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.344 / Virus Database: 191 - Release Date: 4/2/2002 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Databse Access Problem...
do a file called phpinfo.php ? phpinfo(); ? see what version of php are you using, then check in manual if your version is old enough for ocilogon Pusta a écrit : A little background information: Running PHP on Apache server bundled with Oracle Portal on Redhat Linux 7.1. Trying to access the Oracle database from the web using PHP and when I write the connect statement, I get this error: Fatal error: Call to undefined function: ocilogon() in /home/students/uss/public_html/index.php on line 6 Here is my code: HTML HEAD /HEAD BODY ?php $dbconnection = OCILogon(username, password, databasename); $sql = SELECT GURMAIL_PIDM FROM GURMAIL_GENERAL; $parsedsql = OCIParse($dbconnection, $sql) or die(Unable to Parse); OCIExecute($parsedsql) or die(Unable to execute); ? /BODY /HTML Can anyone help?? Is my code wrong? Is the PHP server missing something? Pusta -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] MySQL/PHP Update
Jason a écrit : I'm trying to update my MySQL database, but it doesn't seem to be taking. my code is: mysql_query(update prod_list set prod_manu=$prod_man where sku='$prod'); where prod_manu is an int $prod_man is an int sku is a varchar $prod is text mysql_query() comes back successful, and just to be sure I echoed mysql_error() and nothing came back. What am I doing wrong? if you already have an row with that data, mysql doesn't update the db... do an echo $query to see what exactly is executed. ($query = update prod_list set prod_manu=$prod_man where sku='$prod') -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] A text file include ?
Dave Carrera a écrit : Hi All, I know how to include the contents of a test file into my app. But at the moment I have to type in p/p tags to make in render properly. Is there a way of reading the contents and dynamically creating paragraph breaks or line breaks? yes ereg_replace/preg_replace. searcg for \t (tab) \n (enter) and so on... Dave Carrera Php Developer http://davecarrera.freelancers.net http://www.davecarrera.com -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] insert into javascript php
its me a écrit : script c=document.forms[0].category.options[document.forms[0].category.selectedIndex].text ?php $x=c; ? /script but the php doesn't understand this c variable Rehab M.Shouman maybe is $x = $c ? you can access that option from php $HTTP_POST_VARS[name] $HTTP_GET_VARS[name] - Express yourself with a super cool email address from BigMailBox.com. Hundreds of choices. It's free! http://www.bigmailbox.com - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] login
try header(Location : http://the.page.where.you.want.to.return ); (search in phpmanual) its me a écrit : there is a page that when user go to need to be looged in,so it automaticaly go back with him to loggin page but after login i want him to go back to the page he was in.how? using history()? and how. thanks guys Rehab M.Shouman - Express yourself with a super cool email address from BigMailBox.com. Hundreds of choices. It's free! http://www.bigmailbox.com - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] errorr log
check if YOU can write/read on tmp. Erwien Samantha Y a écrit : Hello guys, anyone can help me with this kind of error log tail -f /www/log/error_log [ cut ] PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 PHP Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0 in every php script that i have , i didn't set any variable about session.save_path. I just set in my php.ini , and the past is coreect /tmp. But why in apache error log i got warning for session data (files). anyone experience with this problem too ? wIEn -- -== HonesT Is The BesT PoLicY ==- - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ '/ ,. \` /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Still bangin my head
if you follow your code you see that you do 0 - 1000 and it's logic to be -1000. Jennifer Downey a écrit : Hi all, I'm still banging my head on this. Let's say I have $1000 to withdraw from my account. I withdraw that $1000 which leaves me $0 dollars in the account. With the code below if I enter another $1000 dollars in the form and hit enter it loans me the thousand and puts my account at -$1000 dollars. What do I need to do to stop it from loaning me the thousand and keep me from having a negative balance? TABLE BORDER=0 WIDTH=25% CELLPADDING=0 CELLSPACING=0 TR TDfont size=2Withdraw/font/TD TD INPUT TYPE=text VALUE= NAME=user_withdraw/TD /TR TR TD/TD TDINPUT TYPE=submit VALUE=Make My Withdrawal NAME=withdraw/TD /TR /TABLE /FORM // used to update if a user makes a withdrawal $query = (UPDATE wt_users set bank_points = bank_points - $user_withdraw, points = points + $user_withdraw WHERE uid={$session[uid]}); $result=mysql_query($query); // select bank points for the user. $sql_result = mysql_query(SELECT bank_points FROM wt_users WHERE uid={$session[uid]}); $row = mysql_fetch_array($sql_result); // if bank points are at 0 then print no points and quit. if ($sql_result = 0) { echo you don't have that many points; exit; } else { echo Your withdraw has been made!; Thanks again in advance Jennifer Downey -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: PHP IDE
hi i don't think their is a good IDE for php. they are a few good editors, but i haven't seen a good debugger. any sugestions? (i wan't to debug a code and have access to HTML forms in same time). Neil Thomson a écrit : i use PHP CODER PR2 the newer version of it i think suks. so if u want it ask. I like it tons. Neil - Original Message - From: ACEAlex [EMAIL PROTECTED] To: php-db [EMAIL PROTECTED] Sent: Sunday, February 24, 2002 8:38 AM Subject: Re: [PHP-DB] Re: PHP IDE I use homesite just to tag the functions in different colors - Original Message - From: robert janeczek [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 23, 2002 8:59 PM Subject: [PHP-DB] Re: PHP IDE After spending two frustrating hours tracking down a bug yesterday - only to discover it was a misplaced quote mark. I've had it. I am looking for suggestions out there for a good IDE for PHP development, preferably one that doesn't cost an arm and a leg. I tried PHP4EE studio, but it is buggy as hell and kept crashing on me. try zend studio - www.zend.com rash -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] php-mysql insert via web form problem
in your php.ini have something about magic_quotes. read the manual. [EMAIL PROTECTED] a écrit : Hello, Thanks for your reply. I am not putting the \ slashes in the query, I think php is. However, I am not sure how to remove them from the query that is being sent to mysql. regards ~:P On Fri, 22 Feb 2002 09:58:27 +0200, Marius Ursache [EMAIL PROTECTED] wrote: i think the query you are sending to mysql should be : insert into pages (page) values ('index') (without \) [EMAIL PROTECTED] a écrit : Hi, I am trying to write a web based form that I can put arbitrary sql statements into and run them against my mysql db. the form is written using php btw. For read operations this seems to work fine, i.e. select, describe, show etc. However, when I try to do an insert to a table I get an sql syntax error and I really can't see the problem. I am writting the query in a html textarea called query and then using this like so: $result=mysql_query($query,$link); I get this error in my browser when I run this: results of query: insert into pages (page) values (\'index\') Error:You have an error in your SQL syntax near '\'index\')' at line 1 And the query that produced this error is: insert into pages (page) values ('index') I've verified that this statement works using the commandline mysql interface. As the web server and db I'm trying to get this to work on are remote I'm not certain of the versions. I've tried using the insert into table_name set column_name=value form in case it was an older version of mysql , but this produces much the same error. Any suggestion greatly appreciated. ~:P Hush provide the worlds most secure, easy to use online applications - which solution is right for you? HushMail Secure Email http://www.hushmail.com/ HushDrive Secure Online Storage http://www.hushmail.com/hushdrive/ Hush Business - security for your Business http://www.hush.com/ Hush Enterprise - Secure Solutions for your Enterprise http://www.hush.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ Hush provide the worlds most secure, easy to use online applications - which solution is right for you? HushMail Secure Email http://www.hushmail.com/ HushDrive Secure Online Storage http://www.hushmail.com/hushdrive/ Hush Business - security for your Business http://www.hush.com/ Hush Enterprise - Secure Solutions for your Enterprise http://www.hush.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] php-mysql insert via web form problem
i think the query you are sending to mysql should be : insert into pages (page) values ('index') (without \) [EMAIL PROTECTED] a écrit : Hi, I am trying to write a web based form that I can put arbitrary sql statements into and run them against my mysql db. the form is written using php btw. For read operations this seems to work fine, i.e. select, describe, show etc. However, when I try to do an insert to a table I get an sql syntax error and I really can't see the problem. I am writting the query in a html textarea called query and then using this like so: $result=mysql_query($query,$link); I get this error in my browser when I run this: results of query: insert into pages (page) values (\'index\') Error:You have an error in your SQL syntax near '\'index\')' at line 1 And the query that produced this error is: insert into pages (page) values ('index') I've verified that this statement works using the commandline mysql interface. As the web server and db I'm trying to get this to work on are remote I'm not certain of the versions. I've tried using the insert into table_name set column_name=value form in case it was an older version of mysql , but this produces much the same error. Any suggestion greatly appreciated. ~:P Hush provide the worlds most secure, easy to use online applications - which solution is right for you? HushMail Secure Email http://www.hushmail.com/ HushDrive Secure Online Storage http://www.hushmail.com/hushdrive/ Hush Business - security for your Business http://www.hush.com/ Hush Enterprise - Secure Solutions for your Enterprise http://www.hush.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] update mysql bug/feature?
hi i have a form. i submit the form. the action should be an UPDATE to mysql table, so i have UPDATE table SET col1='$val1', col2='$val2' WHERE id = '$myid'. after i press the button, i have the message '0 rows changed'. if i press refresh (ctrl+r) and confirm resubmiting of form, the page changes to '1 row changed'. why? why the action it's not performed on first click? thanks -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] multiple forms, one submit button
hi is it posibile to have in a php script multiple forms and only one submit button? if yes, how you recover the submited data? ex: form method=POST action=$REQUEST_URI name=form1 bla bbla /form form method=POST action=$REQUEST_URI name=form2 bgf /form form method=POST action=$REQUEST_URI name=form3 gjhdf input type=submit name = test value = lala /form tnx -- Marius Ursache (3563 || 3494) \|/ \|/ @'/ ,. \`@ /_| \__/ |_\ \__U_/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php