RE: [PHP-DB] form variables and session
Could you give me a complete scripts ??? --www.kapsul.org-- DuFronte -Original Message- From: Smita Manohar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 31, 2002 3:56 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] form variables and session hii all, im not able to acess value of form variables in session. page needs to refresh. register_globles if set to ON. pls help me out. regards, smita _ Add photos to your e-mail with MSN 8. Get 3 months FREE*. http://join.msn.com/?page=features/featuredemail&xAPID=42&PS=47575&PI=73 24&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_addphot os_3mf -- 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] SHOW PICTURE FROM DATABASE
On Tuesday, December 31, 2002, at 02:25 AM, nikos wrote: Steve b. the "_type" is the type of the binary data. From the PHP manual read: "$userfile_type - The mime type of the file if the browser provided this information. An example would be "image/gif" Ok, but it didn't look like you saved the type information in the database, at least it wasn't in your query, so where is it coming from? I mean tacking _type on the variable doesn't magically tell you the mime type except in the case of file uploads (where the type is supplied by the browser), right? Ready to stand corrected... -Steve -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Parameterised queries in Access
Hello, On 12/31/2002 09:57 AM, [EMAIL PROTECTED] wrote: I'm trying to run a parameterised query in MS Access using odbc_prepare and odbc_execute but to no avail. The error message I'm getting is: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecute in c: \inetpub\wwwroot\test\access_db.php on line 17 I've read conflicting messages saying that this paramaterised queries with Access do or don't work. Any definitive answer? The definitive answer is no, despite I don't see why not. It seems to be a problem with PHP. Anyway, you may want to try Metabase which is a PHP abstraction package for developing portable PHP database applications. It supports prepared queries. It comes with a ODBC driver and a sub-driver specialized in Microsoft Access. Metabase is Open Source and is available here: http://www.phpclasses.org/metabase There is a version that is about to be released that includes the specialized ODBC MS Access driver but that is only available for beta testing here: http://groups.yahoo.com/group/metabase-dev/files/beta/ -- Regards, Manuel Lemos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Parameterised queries in Access
Hi All, I'm trying to run a parameterised query in MS Access using odbc_prepare and odbc_execute but to no avail. The error message I'm getting is: Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1., SQL state 07001 in SQLExecute in c: \inetpub\wwwroot\test\access_db.php on line 17 I've read conflicting messages saying that this paramaterised queries with Access do or don't work. Any definitive answer? Win XP Apache 1.3.24 PHP 4.2.3 Access ODBC driver: 4.00.6019.00 Thanks Richy == Richard Black Senior Developer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 951 3481 Email: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Question about rollback in mysql
Arno Kruit wrote: I have php 4.2.3 and Mysql- Max 3.23.54b. If I use the rollback or Commit function it wil work until the scripts ends Is it possible to rollback or commit commands after the scripts ends with a another script? or is rollback only possible in the same script? A.J. Kruit I have sold the problem I upgrade to php 4.3.0 and the problem was sold. A.J. Kruit -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Serve images from files, or db?
On Tuesday 31 December 2002 16:39, Paul Chvostek wrote: > Assuming an "image" isn't necessarily graphical (i.e. it could be a > downloadable file of any type), what are the considerations with regard > to serving binary data out of BLOBs versus recording filenames or URLs > in a table and serving them up by reference? > > I've got two slightly different projects that will need to do this. The > first is a software download site whose users buy access that lets them > download a single file. There will probably be only 40 or 50 files in > the collection, updated every few weeks. Users will log in multiple > times to get updates to the files to which they've got "subscriptions". > > The second project has to provide more complex fraud screening -- i.e. > stop a file from being downloaded by the same user account from too many > different IP addresses in a given time -- but every user has equal > access to all the files in the collection. > > What should I be considering when coming up with a strategy for these > two projects? What are the strengths and weaknesses of storing files > in a BLOB versus storing pointers to those files? The pros and cons have been covered many times before. Check out the archives. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Life is a concentration camp. You're stuck here and there's no way out and you can only rage impotently against your persecutors. -- Woody Allen */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] form variables and session
hii all, im not able to acess value of form variables in session. page needs to refresh. register_globles if set to ON. pls help me out. regards, smita _ Add photos to your e-mail with MSN 8. Get 3 months FREE*. http://join.msn.com/?page=features/featuredemail&xAPID=42&PS=47575&PI=7324&DI=7474&SU= http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglines_addphotos_3mf -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Serve images from files, or db?
Assuming an "image" isn't necessarily graphical (i.e. it could be a downloadable file of any type), what are the considerations with regard to serving binary data out of BLOBs versus recording filenames or URLs in a table and serving them up by reference? I've got two slightly different projects that will need to do this. The first is a software download site whose users buy access that lets them download a single file. There will probably be only 40 or 50 files in the collection, updated every few weeks. Users will log in multiple times to get updates to the files to which they've got "subscriptions". The second project has to provide more complex fraud screening -- i.e. stop a file from being downloaded by the same user account from too many different IP addresses in a given time -- but every user has equal access to all the files in the collection. What should I be considering when coming up with a strategy for these two projects? What are the strengths and weaknesses of storing files in a BLOB versus storing pointers to those files? Thanks. :) -- Paul Chvostek <[EMAIL PROTECTED]> Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PHP files and special characters language
On Monday 30 December 2002 14:38, Ehab El Maraghy wrote: > How can i make php files that are coming out of the server support Right to > left direction languages like Arabic, Hebrew,Persian and Urdu.etc If you're asking what I think you're asking then it's an HTML question: -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* When you die, you lose a very important part of your life. -- Brooke Shields */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SHOW PICTURE FROM DATABASE
Steve a. its a typo of mine in the e-mail b. the "_type" is the type of the binary data. From the PHP manual read: "$userfile_type - The mime type of the file if the browser provided this information. An example would be "image/gif" c. I'll try the file size Thank you anyway - Original Message - From: Steve Cayford To: Nikos Gatsis Cc: PHP-mailist Sent: Tuesday, December 31, 2002 1:07 AM Subject: Re: [PHP-DB] SHOW PICTURE FROM DATABASE Some suggestions... On Monday, December 30, 2002, at 03:55 PM, Nikos Gatsis wrote: > where showpict.php: > > $query="SELECT pict FROM pict WHERE pro_id= '$pro_id"; (You're missing an end ' there, but apparently that's not the problem) > $result=mysql_db_query($database, $query, $conn) or Die > (mysql_error()); > list($photo)=mysql_fetch_row($result); > $type = $photo_type; Where did the $photo_type variable come from? What's in it? > if (!empty($photo)) { > header("Content-Type: {$type}"); I believe this header should be in the form header("Content-Type: image/jpeg") or whatever image type you have. You should probably include an additional header header("Content-Length: " . strlen($photo)); > echo $photo; > } > > THANX > Nikos -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] SHOW PICTURE FROM DATABASE
I've done it allredy! It brings up a line of unknown characters - Original Message - From: John W. Holmes To: 'Nikos Gatsis' ; 'PHP-mailist' Sent: Tuesday, December 31, 2002 1:08 AM Subject: RE: [PHP-DB] SHOW PICTURE FROM DATABASE > I have a php script that call binary data of pictures stored in database. > The script works fine in IE but not in Netscape (ver 4.7, & 6.01). > Any ideas? > > - > the html tag is like: > > where showpict.php: > > $query="SELECT pict FROM pict WHERE pro_id= '$pro_id"; > $result=mysql_db_query($database, $query, $conn) or Die (mysql_error()); > list($photo)=mysql_fetch_row($result); > $type = $photo_type; > if (!empty($photo)) { > header("Content-Type: {$type}"); > echo $photo; > } Call up showpict.php?pro_id=1 in Netscape and see if you get an error. Just type it in and call it up by itself. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/