Re: [PHP] Store/Retrieve Word Documents in MySQL/PHP?

2002-06-11 Thread Brad McCrorey

This raises an interesting question (at least to me). I've had problems 
like this before and had to hunt high and low for the mime type for a 
file. Does anyone know of a listing for mime types (besides going 
through the built-ins in the browser). Seems like a really handy 
resource. File it near the local copy of the php manual and the websafe 
palette. =)

Cheers,

Brad
Miguel Cruz wrote:

On Tue, 11 Jun 2002, Håkan Askengren wrote:
  

I have managed to load images to database through php, but what about other
file types as MS Word (yes I dare to mention it here...)
What headers etcetera are needed?



  Content-Type: application/msword

miguel


  





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Store/Retrieve Word Documents in MySQL/PHP?

2002-06-11 Thread Brad McCrorey

Aha! Nice one. thanks for that!

Miguel Cruz wrote:

I usually just grep through the one that comes with Apache; it's fairly 
thorough. You might find it in /usr/local/apache/conf/mime.types

miguel

On Wed, 12 Jun 2002, Brad McCrorey wrote:
  

This raises an interesting question (at least to me). I've had problems 
like this before and had to hunt high and low for the mime type for a 
file. Does anyone know of a listing for mime types (besides going 
through the built-ins in the browser). Seems like a really handy 
resource. File it near the local copy of the php manual and the websafe 
palette. =)

Cheers,

Brad
Miguel Cruz wrote:



On Tue, 11 Jun 2002, Håkan Askengren wrote:
 

  

I have managed to load images to database through php, but what about other
file types as MS Word (yes I dare to mention it here...)
What headers etcetera are needed?
   



 Content-Type: application/msword

miguel


 

  









  



-- 
--
Cynicism: an extension of ennui maintaining that not only are you bored,
you are in a state of disbelief as well. And you cannot be convinced
otherwise...more than a pose, it's also a handy time saver. By deflating
your companion's enthusiasm, you can cut conversation in half.
Lisa Bernbach
The Official Preppy Handbook, 1981




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] php's variables javascript

2002-05-27 Thread Brad McCrorey

Or something easier...

?
$size = 222;
print HTML
script language=JavaScript
  width = $size;
/script
HTML;
?

Just make sure the HTML; bit is all the way on the left margin, 
regardless of tabstops in your code.

cheers,

Brad

Boyan Nedkov wrote:

Try something like that:

?
//$size = GetImageSize (images/$resim);
$size = 222;
echo script language=\JavaScript\;
  echo width=; echo $size; echo ;;  
echo /script;
?

Cheers, boyan

--
Boyan Nedkov
[EMAIL PROTECTED]


  

-Original Message-
From: burak delice [mailto:[EMAIL PROTECTED]] 
Sent: Monday, May 27, 2002 11:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php's variables  javascript


hi everyone,

I want to make a php that include javascript that use a php 
variable. Code is below:

?
$size = GetImageSize (images/$resim);
echo script language=\JavaScript\
  wdth=;$size;echo;;
  echo /script;
?

(I am calling that php file as below) 
http://localhost/Aksu/web/getimage.php? resim=K00.jpg

But 
explore gives me an javascript error that 
syntax error. Why? and how can do my purpose?

thanks
burak delice





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






  





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] stupid error, please kick me (and send me a solution)

2002-06-03 Thread Brad McCrorey

Please note that this only neccesarily applies to MySQL. I've run into a 
lot of problems by assuming double-quote syntax with postgres and mssql.

A better solution is to stop writing your own queries and use an 
abstraction library.

Cheers,

Brad
Sqlcoders.com Programming Dept wrote:

Hiya,
You're using single quotes around all your strings,
for variables to be replaced with their values, you must use double quotes.
Try replacing every ' with .

HTH,
Dw

Sqlcoders.com Dynamic data driven web solutions
- Original Message -
From: Jule Slootbeek [EMAIL PROTECTED]
To: mysql [EMAIL PROTECTED]; php-general
[EMAIL PROTECTED]
Sent: June 03 2002 03:09 PM
Subject: [PHP] stupid error, please kick me (and send me a solution)


  

Hey guys,
i'm getting this error with the following sql script using php:
--error--
Warning: Supplied argument is not a valid MySQL-Link resource in
/var/www/phpquiz/register_user.php on line 12
--error--

--script--
$link_glob = mysql_connect('$host_glob', '$un_glob', '$pw_glob');
$query = INSERT INTO user values('0', '$fname', '$lname', '$email',
'$username', PASSWORD('$password');
$result = mysql_db_query('$db_glob', '$query', $link_glob');
if (!$result) {
echo font size=+1Your Information could not be entered into the


database,
  

Please contact the a
href=mailto:$webmasterwebmaster/a./fontbrbr . mysql_errno() .
:  . mysql_error() . brbr;
} else {
echo font size=+1Your Information has successfully been entered into


the
  

database!/fontbr;

--
Jule Slootbeek
[EMAIL PROTECTED]

http://blindtheory.cjb.net



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






  





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php