Re: [PHP-DB] Uploading files
Im just doing a copy(...) in first place. In second Ill put some information in MySQL. I've made application inserting photos in BLOB columns without problems. Now I want to copy big files (>5M) in my server. - Original Message - From: "Daniel Brunner" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 27, 2004 11:22 PM Subject: Re: [PHP-DB] Uploading files > Hello, > > > Are you uploading files into MYSQL or any other DB?? > > > Or are you uploading the files to a directory and inserting the > location of the file in the database?? > > > > Dan > > > On Feb 27, 2004, at 3:19 PM, [EMAIL PROTECTED] wrote: > > > Pavel my form works fine with files < 1M > > > > - Original Message - > > From: "Pavel Lobovich" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Cc: "PHP-mailist" <[EMAIL PROTECTED]> > > Sent: Friday, February 27, 2004 6:50 PM > > Subject: Re: [PHP-DB] Uploading files > > > > > >>> If your on a slow connection, it might be timing out. > >>> > >>> Try putting: > >>> > >>> set_time_limit(0); > >>> > >>> At the top of the page where the file is being uploaded to (not > >>> from), > >>> and see if that helps. > >> > >> You dont have to do it. Script execution will not start before all > >> posted files are uploaded. If your browser refuses a connection and > >> sends "Server not found" then check your form (especially action > >> attribute ). > >> > >> Sorry for my english. > >> > >> Pavel. > >> > >> > >> > >>> > >>> > >>> On Fri, 2004-02-27 at 10:29, nikos wrote: > It is allready 8M > > - Original Message - > From: "Adam Voigt" <[EMAIL PROTECTED]> > To: "nikos" <[EMAIL PROTECTED]> > Cc: "PHP-mailist" <[EMAIL PROTECTED]> > Sent: Friday, February 27, 2004 5:13 PM > Subject: Re: [PHP-DB] Uploading files > > > > Your max post size needs to be upped to, try making it 6M and see > > if > > that makes a difference. > > > > > > On Fri, 2004-02-27 at 10:05, nikos wrote: > >> Hello list > >> > >> Allthough I set my PHP.in upload_max_file=4M my system refused to > > upload > >> files bigger than 1M and the browser send an "server not found" > > error. > >> > >> Does anybody know anything about that? > >> Thank you > > -- > > > > Adam Voigt > > [EMAIL PROTECTED] > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > >>> -- > >>> > >>> Adam Voigt > >> [EMAIL PROTECTED] > >> > >> -- > >> 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 > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: passing parameter to function
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > Hi, > > Say I have a script that knows the value of a variable $codename. > The script contains a function that needs to know the value of $codename. > What is the syntax for passing the parameter to the function? > > Example: the script knows that $codename = blah. The function has to > pass 'blah' on to another script as a hidden value in a form using the > POST method. The other script is not receiving the value of $codename. > > Thanks for any help. > Robbie > > There are some examples at http://www.php.net/manual/en/functions.php which should give you some ideas. -- Quod subigo farinam A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Uploading files
Hello, Are you uploading files into MYSQL or any other DB?? Or are you uploading the files to a directory and inserting the location of the file in the database?? Dan On Feb 27, 2004, at 3:19 PM, [EMAIL PROTECTED] wrote: Pavel my form works fine with files < 1M - Original Message - From: "Pavel Lobovich" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "PHP-mailist" <[EMAIL PROTECTED]> Sent: Friday, February 27, 2004 6:50 PM Subject: Re: [PHP-DB] Uploading files If your on a slow connection, it might be timing out. Try putting: set_time_limit(0); At the top of the page where the file is being uploaded to (not from), and see if that helps. You dont have to do it. Script execution will not start before all posted files are uploaded. If your browser refuses a connection and sends "Server not found" then check your form (especially action attribute ). Sorry for my english. Pavel. On Fri, 2004-02-27 at 10:29, nikos wrote: It is allready 8M - Original Message - From: "Adam Voigt" <[EMAIL PROTECTED]> To: "nikos" <[EMAIL PROTECTED]> Cc: "PHP-mailist" <[EMAIL PROTECTED]> Sent: Friday, February 27, 2004 5:13 PM Subject: Re: [PHP-DB] Uploading files Your max post size needs to be upped to, try making it 6M and see if that makes a difference. On Fri, 2004-02-27 at 10:05, nikos wrote: Hello list Allthough I set my PHP.in upload_max_file=4M my system refused to upload files bigger than 1M and the browser send an "server not found" error. Does anybody know anything about that? Thank you -- Adam Voigt [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Adam Voigt [EMAIL PROTECTED] -- 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
Re: [PHP-DB] Uploading files
Adam, everything happens "rapidly". I dont think that the connection is the problem. I work in a local lan. Thank you - Original Message - From: "Adam Voigt" <[EMAIL PROTECTED]> To: "nikos" <[EMAIL PROTECTED]> Cc: "PHP-mailist" <[EMAIL PROTECTED]> Sent: Friday, February 27, 2004 5:38 PM Subject: Re: [PHP-DB] Uploading files > If your on a slow connection, it might be timing out. > > Try putting: > > set_time_limit(0); > > At the top of the page where the file is being uploaded to (not from), > and see if that helps. > > > On Fri, 2004-02-27 at 10:29, nikos wrote: > > It is allready 8M > > > > - Original Message - > > From: "Adam Voigt" <[EMAIL PROTECTED]> > > To: "nikos" <[EMAIL PROTECTED]> > > Cc: "PHP-mailist" <[EMAIL PROTECTED]> > > Sent: Friday, February 27, 2004 5:13 PM > > Subject: Re: [PHP-DB] Uploading files > > > > > > > Your max post size needs to be upped to, try making it 6M and see if > > > that makes a difference. > > > > > > > > > On Fri, 2004-02-27 at 10:05, nikos wrote: > > > > Hello list > > > > > > > > Allthough I set my PHP.in upload_max_file=4M my system refused to upload > > > > files bigger than 1M and the browser send an "server not found" error. > > > > > > > > Does anybody know anything about that? > > > > Thank you > > > -- > > > > > > Adam Voigt > > > [EMAIL PROTECTED] > > > > > > -- > > > PHP Database Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > > Adam Voigt > [EMAIL PROTECTED] > > -- > 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
Re: [PHP-DB] Uploading files
Pavel my form works fine with files < 1M - Original Message - From: "Pavel Lobovich" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "PHP-mailist" <[EMAIL PROTECTED]> Sent: Friday, February 27, 2004 6:50 PM Subject: Re: [PHP-DB] Uploading files > > If your on a slow connection, it might be timing out. > > > > Try putting: > > > > set_time_limit(0); > > > > At the top of the page where the file is being uploaded to (not from), > > and see if that helps. > > You dont have to do it. Script execution will not start before all > posted files are uploaded. If your browser refuses a connection and > sends "Server not found" then check your form (especially action > attribute ). > > Sorry for my english. > > Pavel. > > > > > > > > > On Fri, 2004-02-27 at 10:29, nikos wrote: > > > It is allready 8M > > > > > > - Original Message - > > > From: "Adam Voigt" <[EMAIL PROTECTED]> > > > To: "nikos" <[EMAIL PROTECTED]> > > > Cc: "PHP-mailist" <[EMAIL PROTECTED]> > > > Sent: Friday, February 27, 2004 5:13 PM > > > Subject: Re: [PHP-DB] Uploading files > > > > > > > > > > Your max post size needs to be upped to, try making it 6M and see if > > > > that makes a difference. > > > > > > > > > > > > On Fri, 2004-02-27 at 10:05, nikos wrote: > > > > > Hello list > > > > > > > > > > Allthough I set my PHP.in upload_max_file=4M my system refused to upload > > > > > files bigger than 1M and the browser send an "server not found" error. > > > > > > > > > > Does anybody know anything about that? > > > > > Thank you > > > > -- > > > > > > > > Adam Voigt > > > > [EMAIL PROTECTED] > > > > > > > > -- > > > > PHP Database Mailing List (http://www.php.net/) > > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > > > > Adam Voigt > [EMAIL PROTECTED] > > -- > 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
Re: [PHP-DB] INSERT dynamic values problem - Need help urgently!
Try: " .$row["class_code"]. ""; > while ($row = mysql_fetch_array($sql)) > { > print "" .$row["class_code"]. ""; > } > $result = $db->query($sql); > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP ODBC and Pervasive.SQL
Robert, Thank you very much for your post: odbtp solved the problem and gave me a head start on moving the site to a Linux box. Pascal "Robert Twitty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi Pascal > > The odbc extension uses ODBC 2, while Access and Pervasive are most likely > using ODBC 3. This may or may not be the cause of your problem. Try using > the odbtp extension at http://odbtp.sourceforge.net. It uses ODBC 3, and > may give you better results. > > -- bob > > On Wed, 25 Feb 2004, Pascal Schaedeli wrote: > > > Hi, > > > > I am executing a SELECT query from PHP (4.3.4) through ODBC on a Pervasive > > 2000SP4 (all on Windows). odbc_result_all, odbc_fetch_into, and all other > > php odbc function stop returning records before the end of the effective > > resultset. > > > > Here is what is happening : > > * In Pervasive: SELECT * FROM table returns n records (correct). > > * In Access, throught ODBC, the same query returns the same n records > > (correct). > > * In PHP, odbc_exec of the same query returns m > > > Specifically, I have identifed one field (call it fieldx) that seems to be > > at the source of the problem : it seems stored over 4 bytes in Pervasive and > > represents a decimal number. > > If I rewrite the query in PHP to read SELECT fielda, fieldb,fieldc FROM > > table, it returns n records (correct) (just to clarify SELECT fielda, > > fieldb,fieldc,fieldx FROM table returns m > > > How many is m? It depends on the sort order. I have identified with record's > > fieldx is causing the problem. The records returned by odbc_* are up to that > > problem record. If the sort order makes that problem record to be the last > > one, then m = n-1. If the sort order makes that record be the first, then m > > = 0. > > > > Here is even more details for those who are still reading: > > fieldx is written to Pervasive from an application for which I do not have > > the source code. If I read the content of fieldx of the problem records, > > erase it and manually re-enter it (in Pervasive Control Center), the issue > > is solved and the PHP odbc query returns n records. > > > > I'm not an expert on odbc and pervasive. Intuitively, it seems that the > > field is somehow missformated. However, both Pervasive and Access are able > > to interpret it correctly. > > > > Does anybody have a suggestion on how I could either: > > - Get Pervasive to reformat all field correctly. > > - Get the odbc library in PHP to at least give me an error, or better, > > interpret the field as Access does. > > > > Thanks, > > Pascal > > > > -- > > 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
Re: [PHP-DB] Passing the value of a variable from PHP to JavaScript.
Here is the working code: function tes(){ document.write('JavaScript
'); o=document.getElementById('myselect'); window.location.replace('http://192.168.23.1/coba/coba.php?vtes='+o.value); } "; echo "diforward ke javascript"; echo " 1 2 "; ?> == That's all Best regards, Pavel. I expect this result on url column of my internet browser: " http://192.168.23.1/coba/coba.php?vtes='1' > " > or > " > http://192.168.23.1/coba/coba.php?vtes='1' > " > > But I only get this unexpected result: > " > http://192.168.23.1/coba/coba.php?vtes= > " > > Lookslike the value of "$vtes" was not passed to JavaScript > interpreter. > > Anybody of you have a solution for me? > > Please teach me. > > Thank you very much. > -- > _ > Web-based SMS services available at http://www.operamail.com. > >From your mailbox to local or overseas cell phones. > > Powered by Outblaze -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Uploading files
> If your on a slow connection, it might be timing out. > > Try putting: > > set_time_limit(0); > > At the top of the page where the file is being uploaded to (not from), > and see if that helps. You dont have to do it. Script execution will not start before all posted files are uploaded. If your browser refuses a connection and sends "Server not found" then check your form (especially action attribute ). Sorry for my english. Pavel. > > > On Fri, 2004-02-27 at 10:29, nikos wrote: > > It is allready 8M > > > > - Original Message - > > From: "Adam Voigt" <[EMAIL PROTECTED]> > > To: "nikos" <[EMAIL PROTECTED]> > > Cc: "PHP-mailist" <[EMAIL PROTECTED]> > > Sent: Friday, February 27, 2004 5:13 PM > > Subject: Re: [PHP-DB] Uploading files > > > > > > > Your max post size needs to be upped to, try making it 6M and see if > > > that makes a difference. > > > > > > > > > On Fri, 2004-02-27 at 10:05, nikos wrote: > > > > Hello list > > > > > > > > Allthough I set my PHP.in upload_max_file=4M my system refused to upload > > > > files bigger than 1M and the browser send an "server not found" error. > > > > > > > > Does anybody know anything about that? > > > > Thank you > > > -- > > > > > > Adam Voigt > > > [EMAIL PROTECTED] > > > > > > -- > > > PHP Database Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > > Adam Voigt [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] INSERT dynamic values problem - Need help urgently!
> Hi all: > > I am trying to create a registration form whereby one of the user input is as > follows: (a drop down menu with values retrieved from DB): > - > > Class Code: > > > $sql = mysql_query("SELECT DISTINCT class_code FROM class"); > while ($row = mysql_fetch_array($sql)) > { > print "" .$row["class_code"]. ""; > } > $result = $db->query($sql); > > ?> > > 1. The variable $class_code is undefined. Use: print "" .$row["class_code"]. ""; 2. Use mysql_fetch_assoc() instead mysql_fetch_array() if you want to fetch hashed array ONLY. 3. After the form submitted the variable $_REQUEST[ 'class_code' ] contains selected item value, for example "1234". You can insert it into database using the following SQL query: $sql = 'INSERT INTO `class` (`class_code`, `another_field`, `third_etc` ) VALUES( ' . mysql_escape_string( $_REQUEST[ 'class_code' ] ) . ', "value", "value_etc" )'; Sorry for my english. Pavel. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SQL File Import problem (Was: HELP!!!)
I have the same problem right now, after a very short search in google i found this: http://www.mysql.com/documentation/mysql/bychapter/manual_Problems.html#Gone _away In my case i get the message "max_allowed_packet is too small" because i was trying to insert an image > 1M into the database. - Original Message - From: "Doug Thompson" <[EMAIL PROTECTED]> To: "Robin 'Sparky' Kopetzky" <[EMAIL PROTECTED]> Cc: "Erwin Kerk" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, February 27, 2004 1:04 AM Subject: Re: [PHP-DB] SQL File Import problem (Was: HELP!!!) > On Fri, 27 Feb 2004 01:16:20 +0100, Erwin Kerk wrote: > > >Robin 'Sparky' Kopetzky wrote: > > > >> Good afternoon! > >> > >> I used SQLYOG to export the tables and data from a Mysql database. Now, when > >> i try to re-import the data back into a different database, I get an error > >> stating "Error : MySQL server has gone away". What is happening and how do I > >> fix this. I NEED this script to execute badly. I even tries running it under > >> mysql using source "filename.sql" and got the same error. One table is over > >> 75,000 entries. > >The queries are taking too long. Are this plain .sql files? If so, try > >to split them up in say, 10 separate files, and import them all > >separately. That should work. > > > >And in the futue, try putting a more descriptive text in youre subject. > > > > > >Erwin Kerk > >Web Developer > > > >-- > > Erwin is exactly right.That being said: > > You don't say and it's risky to assume if you can do any other tasks on the new server. In other words, is it running at all? > > You don't say which of SQLyog's methods you used to create the backup. In this case, I would have used > DB -> Export Database as Batch Scripts > and I would save the file as .sql and transfer that file to the mysql/bin directory on the new system. > > Assuming mysqld is running on the new system, cd to the mysql/bin subdirectory and type > ./mysql -uusername -ppassword < somefile.sql > > Of course, all the foregoing syntax for re-installing presumes *n*x. > > I move databases from my local windows system to a remote *n*x site frequently using the above process and it is very reliable and repeatable. > > hth, > Doug > > -- > 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
Re: [PHP-DB] Uploading files
If your on a slow connection, it might be timing out. Try putting: set_time_limit(0); At the top of the page where the file is being uploaded to (not from), and see if that helps. On Fri, 2004-02-27 at 10:29, nikos wrote: > It is allready 8M > > - Original Message - > From: "Adam Voigt" <[EMAIL PROTECTED]> > To: "nikos" <[EMAIL PROTECTED]> > Cc: "PHP-mailist" <[EMAIL PROTECTED]> > Sent: Friday, February 27, 2004 5:13 PM > Subject: Re: [PHP-DB] Uploading files > > > > Your max post size needs to be upped to, try making it 6M and see if > > that makes a difference. > > > > > > On Fri, 2004-02-27 at 10:05, nikos wrote: > > > Hello list > > > > > > Allthough I set my PHP.in upload_max_file=4M my system refused to upload > > > files bigger than 1M and the browser send an "server not found" error. > > > > > > Does anybody know anything about that? > > > Thank you > > -- > > > > Adam Voigt > > [EMAIL PROTECTED] > > > > -- > > PHP Database Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Adam Voigt [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Uploading files
It is allready 8M - Original Message - From: "Adam Voigt" <[EMAIL PROTECTED]> To: "nikos" <[EMAIL PROTECTED]> Cc: "PHP-mailist" <[EMAIL PROTECTED]> Sent: Friday, February 27, 2004 5:13 PM Subject: Re: [PHP-DB] Uploading files > Your max post size needs to be upped to, try making it 6M and see if > that makes a difference. > > > On Fri, 2004-02-27 at 10:05, nikos wrote: > > Hello list > > > > Allthough I set my PHP.in upload_max_file=4M my system refused to upload > > files bigger than 1M and the browser send an "server not found" error. > > > > Does anybody know anything about that? > > Thank you > -- > > Adam Voigt > [EMAIL PROTECTED] > > -- > 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
Re: [PHP-DB] INSERT dynamic values problem - Need help urgently!
Irin, First of all, you need to do this instead of what you're doing: while ($row = mysql_fetch_row($sql)) Second, this value should be storable just as any other values. i.e. mysql_query("insert into database (table) values('" . $_POST['class_code'] . "')"); I hope this helps you a bit. Regards, Mikael On Feb 27, 2004, at 15:26, [EMAIL PROTECTED] wrote: Hi all: I am trying to create a registration form whereby one of the user input is as follows: (a drop down menu with values retrieved from DB): --- -- Class Code: $sql = mysql_query("SELECT DISTINCT class_code FROM class"); while ($row = mysql_fetch_array($sql)) { print "" .$row["class_code"]. ""; } $result = $db->query($sql); ?> --- -- My problem was: 1. I was unable to print the values I have selected from this drop down menu and 2. insert this "dynamic values" into the DB?? I was able to insert static values into DB but not "dynamic" values... How should I go about doing this? Really need some help here... Thanks in advance. All help are greatly appreciated. Regards, Irin. -- 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-DB] INSERT dynamic values problem - Need help urgently!
Hi all: I am trying to create a registration form whereby one of the user input is as follows: (a drop down menu with values retrieved from DB): - Class Code: " .$row["class_code"]. ""; } $result = $db->query($sql); ?> - My problem was: 1. I was unable to print the values I have selected from this drop down menu and 2. insert this "dynamic values" into the DB?? I was able to insert static values into DB but not "dynamic" values... How should I go about doing this? Really need some help here... Thanks in advance. All help are greatly appreciated. Regards, Irin. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Uploading files
Your max post size needs to be upped to, try making it 6M and see if that makes a difference. On Fri, 2004-02-27 at 10:05, nikos wrote: > Hello list > > Allthough I set my PHP.in upload_max_file=4M my system refused to upload > files bigger than 1M and the browser send an "server not found" error. > > Does anybody know anything about that? > Thank you -- Adam Voigt [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Uploading files
Hello list Allthough I set my PHP.in upload_max_file=4M my system refused to upload files bigger than 1M and the browser send an "server not found" error. Does anybody know anything about that? Thank you -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Using printer in Php code
Mucella (Erdem) Efe wrote: Yes I restart it and I solved the problem. Thank you. But at this time I can't use the printer that is not connected to the web server directly . I want to use a printer which is being used by web server as a network printer.Is it possible or not? Hmmm, I don't think this is possible. Perhaps you could install Apache + PHP on the machine where the printer is connected to? By the way, please keep the discussion ON the list, other might benefit from it. So, choose Reply All when replying to a message. -- Erwin Kerk Web Developer GPG: http://www.infofeed.nl/~gpg/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] User Authentication
On Friday 27 February 2004 22:42, Craig Hoffman wrote: > Thanks - I can't believe I missed that. :( And I'm sure you'll want to stick in a mysql_error() as well. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db -- /* Write yourself a threatening letter and pen a defiant reply. */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] User Authentication
Thanks - I can't believe I missed that. :( Craig __ Craig Hoffman - eClimb Media v: (847) 644 - 8914 f: (847) 866 - 1946 e: [EMAIL PROTECTED] w: www.eclimbmedia.com _ On Feb 27, 2004, at 8:34 AM, Jason Wong wrote: On Friday 27 February 2004 22:26, Craig Hoffman wrote: I could use some help here. I have a script that checks a user name and password against the MySQL DB. I have it set as a function so I included/require it on the page. Here is the script: [snip] When I change the "return false" to "return true" in the first script (login) it authenticates, but logs any one in. Not good. Does anyone have any ideas or suggestions? You aren't actually performing any queries -- you're missing a mysql_query(). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db -- /* The average girl would rather have beauty than brains because she knows that the average man can see much better than he can think. -- Ladies' Home Journal */ -- 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
Re: [PHP-DB] User Authentication
Jason Wong wrote: You aren't actually performing any queries -- you're missing a mysql_query(). Ah. Did i mis that too? Unbelievable Erwin Kerk Web Developer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] User Authentication
On Friday 27 February 2004 22:26, Craig Hoffman wrote: > I could use some help here. I have a script that checks a user name > and password against the MySQL DB. I have it set as a function so I > included/require it on the page. Here is the script: [snip] > When I change the "return false" to "return true" in the first script > (login) it authenticates, but logs any one in. Not good. Does anyone > have any ideas or suggestions? You aren't actually performing any queries -- you're missing a mysql_query(). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-db -- /* The average girl would rather have beauty than brains because she knows that the average man can see much better than he can think. -- Ladies' Home Journal */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] User Authentication
Peter Beckman wrote: Try fixing your SQL: $result = ("select user_id, password FROM users WHERE username='$username'... You forgot a comma between user_id and password. Yup, that too. Oops, missed it too. Erwin Kerk Web Developer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] User Authentication
Try fixing your SQL: $result = ("select user_id, password FROM users WHERE username='$username'... You forgot a comma between user_id and password. On Fri, 27 Feb 2004, Craig Hoffman wrote: >// check if username >$result = ("select user_id password FROM users WHERE > username='$username' AND password=md5('$password')"); --- Peter Beckman Internet Guy [EMAIL PROTECTED] http://www.purplecow.com/ --- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] User Authentication
Craig Hoffman wrote: $result = ("select user_id password FROM users WHERE username='$username' AND password=md5('$password')"); password is a reserved word. try this instead: $result = ("select user_id password FROM users WHERE username='$username' AND `password`=md5('$password')"); Erwin Kerk Web Developer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] User Authentication
Hello, I could use some help here. I have a script that checks a user name and password against the MySQL DB. I have it set as a function so I included/require it on the page. Here is the script: function login($username, $password) // check username and password with db { // connect to db $conn = db_connect(); if (!$conn) return false; // check if username $result = ("select user_id password FROM users WHERE username='$username' AND password=md5('$password')"); if (!$result) return false; if (mysql_num_rows($result) > 0 ) return true; else return false; } Here is my DB script: function db_connect() { // connect to database $result = mysql_connect("localhost", "xx", "xx"); if (!$result) return false; if (!mysql_select_db("")); return false; return $result; } When I change the "return false" to "return true" in the first script (login) it authenticates, but logs any one in. Not good. Does anyone have any ideas or suggestions? Thanks in advance, Craig __ Craig Hoffman - eClimb Media v: (847) 644 - 8914 f: (847) 866 - 1946 e: [EMAIL PROTECTED] w: www.eclimbmedia.com _ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Using printer in Php code
Mücella Erdem Efe wrote: I use the Php 4.3.3 on WindowsXP with Apache Server I want to use $handle = printer_open("PCLAB1"); statement in my php program But it does not work. Almost I have defined the "extension=php_printer.dll " and "printer.default_printer = "PCLAB1"in the c:/windows/php.ini file. The error is "Fatal error: Call to undefined function: printer_open() in pclab1printer.php on line 57". Help me please Did you restart Apache?? Erwin Kerk Web Developer -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Database Search Engine ?
I see. But what if I am using mySQL? *by the way, can you tell me from where I get them. -M.Mamedov - Original Message - From: "Joshua D. Drake" <[EMAIL PROTECTED]> To: "Muhammed Mamedov" <[EMAIL PROTECTED]> Cc: "phpdb" <[EMAIL PROTECTED]> Sent: Thursday, February 26, 2004 12:59 PM Subject: Re: [PHP-DB] Database Search Engine ? > Hello, > > I suggest PostgreSQL+TSearch2+OpenFTS... > > 30 minutes to a wonderful search engine. > > On Thu, 26 Feb 2004, Muhammed Mamedov wrote: > > > Anyone knows/uses IMP database search engine? > > http://www.imptechnology.com/DesktopDefault.aspx?tabid=56 > > > > Thanks, > > M.Mamedov > > > > -- > Co-Founder > Command Prompt, Inc. > The wheel's spinning but the hamster's dead > > -- > 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-DB] Using printer in Php code
I use the Php 4.3.3 on WindowsXP with Apache Server I want to use $handle = printer_open("PCLAB1"); statement in my php program But it does not work. Almost I have defined the "extension=php_printer.dll " and "printer.default_printer = "PCLAB1"in the c:/windows/php.ini file. The error is "Fatal error: Call to undefined function: printer_open() in pclab1printer.php on line 57". Help me please -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Passing the value of a variable from PHP to JavaScript.
Hi Prabu you need to add a few bits: in the function: function tes(){ vtes = theform.vtes.value; #added line document.write('JavaScript'); window.location.replace('http://127.0.0.1/coba/coba.php?vtes=' + vtes); #altered line in the body: and before the may be a bit ott but should work steve } Prabu Subroto wrote: Dear my friends... I have my code like this : == function tes(){ document.write('JavaScript
'); window.location.replace('http://192.168.23.1/coba/coba.php?vtes=$vtes');
} "; echo "diforward ke javascript"; echo " 1 2 "; ?> == I expect this result on url column of my internet browser: " http://192.168.23.1/coba/coba.php?vtes='1' " or " http://192.168.23.1/coba/coba.php?vtes='1' " But I only get this unexpected result: " http://192.168.23.1/coba/coba.php?vtes= " Lookslike the value of "$vtes" was not passed to JavaScript interpreter. Anybody of you have a solution for me? Please teach me. Thank you very much. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
SV: [PHP-DB] Passing the value of a variable from PHP to JavaScript.
Hi, Where is the value of $vtes comming from? If it's a parameter in the call of your script, try something like function tes(){ document.write('JavaScript
'); window.location.replace('http://192.168.23.1/coba/coba.php?vtes==$_GET ["vtes"]?>'); } diforward ke javascript 1 2 Hth Henrik Hornemann -Oprindelig meddelelse- Fra: Prabu Subroto [mailto:[EMAIL PROTECTED] Sendt: 27. februar 2004 10:03 Til: [EMAIL PROTECTED] Emne: [PHP-DB] Passing the value of a variable from PHP to JavaScript. Dear my friends... I have my code like this : == function tes(){ document.write('JavaScript
'); window.location.replace('http://192.168.23.1/coba/coba.php?vtes=$vtes'); } "; echo "diforward ke javascript"; echo " 1 2 "; ?> == I expect this result on url column of my internet browser: " http://192.168.23.1/coba/coba.php?vtes='1' " or " http://192.168.23.1/coba/coba.php?vtes='1' " But I only get this unexpected result: " http://192.168.23.1/coba/coba.php?vtes= " Lookslike the value of "$vtes" was not passed to JavaScript interpreter. Anybody of you have a solution for me? Please teach me. Thank you very much. -- _ Web-based SMS services available at http://www.operamail.com. From your mailbox to local or overseas cell phones. Powered by Outblaze -- 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-DB] Passing the value of a variable from PHP to JavaScript.
Dear my friends... I have my code like this : == function tes(){ document.write('JavaScript
'); window.location.replace('http://192.168.23.1/coba/coba.php?vtes=$vtes'); } "; echo "diforward ke javascript"; echo " 1 2 "; ?> == I expect this result on url column of my internet browser: " http://192.168.23.1/coba/coba.php?vtes='1' " or " http://192.168.23.1/coba/coba.php?vtes='1' " But I only get this unexpected result: " http://192.168.23.1/coba/coba.php?vtes= " Lookslike the value of "$vtes" was not passed to JavaScript interpreter. Anybody of you have a solution for me? Please teach me. Thank you very much. -- _ Web-based SMS services available at http://www.operamail.com. >From your mailbox to local or overseas cell phones. Powered by Outblaze -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php