[PHP] Test Links...

2003-09-26 Thread Doug Coning
Greetings All,

I am creating a 'links' page and was wondering if there was a way in PHP
to test the response of an outside link?  I'm sure everyone here has
clicked on a links page link and have a "No Page Found" error because no
one is keeping the links uptodate.  I was wondering if there was a way
when a link was clicked to test the link first to see if it is still
active.  If it isn't active, I would like to remove the link from my
database.

Is there a command that tests the results of link?

Thanks,

Doug Coning
American Web Studio
http://www.americanwebstudio.com
HTML / FLASH / PHP / MYSQL / FILEMAKER



[PHP] Form Retain Info on Back?

2003-07-31 Thread Doug Coning
Hi All,

I have a php form that I run a test to see if they have entered in all
required fields before inserting into a MySQL db.  The PHP script simply
reports what is missing and exits the rest of the page.  However, when
you click the back button, all the information that was entered, is
gone.  Is there a simple way of retaining this information so the user
doesn't has to retype all the information in?

Doug 


[PHP] Encoding /'s

2003-03-15 Thread Doug Coning
Hi All,

When my PHP page sends text that is being passed in, it places an "/" in
front of the apostrophe.  How do I encode or decode this when I am outputing
the variable?

Thanks,

Doug Coning




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



Re: [PHP] imagejpeg and downloading images

2003-03-11 Thread Doug Coning
Thanks to everyone for their help.

The code below worked great!  Thanks,

Doug Coning
- Original Message -
From: "adrian [EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: "Doug Coning" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 11, 2003 11:57 AM
Subject: Re: [PHP] imagejpeg and downloading images


> try changing headers sent e.g
>
> header("Content-type: application/octet-stream");
> header("Content-Disposition: attachment; filename=001_SM77GR.jpg");
>
> $im = imagecreatefromjpeg("001_SM77GR.jpg");
> imagejpeg($im,'',85);
> imagedestroy($im);
>
> - Original Message -
> From: "Doug Coning" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 11, 2003 4:40 PM
> Subject: [PHP] imagejpeg and downloading images
>
>
> > Hi All,
> >
> > I'm using the following code to try to download images automatically
from
> a
> > directory:
> >
> > header('Content-Type: image/jpeg');
> > $im = imagecreatefromjpeg("001_SM77GR.jpg");
> > imagejpeg($im,'',85);
> > imagedestroy($im);
> >
> > I copied this code from PHP.net.  However, when I run the above code, it
> > doesn't download the image, it just shows the image in the browser.  I'm
> > using IE 6 for my browser.
> >
> > How I get PHP to download this image?
> >
> > Thanks!
> >
> > Doug Coning
> >
> >
> >
> >
> > --
> > 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
>




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



[PHP] imagejpeg and downloading images

2003-03-11 Thread Doug Coning
Hi All,

I'm using the following code to try to download images automatically from a
directory:

header('Content-Type: image/jpeg');
$im = imagecreatefromjpeg("001_SM77GR.jpg");
imagejpeg($im,'',85);
imagedestroy($im);

I copied this code from PHP.net.  However, when I run the above code, it
doesn't download the image, it just shows the image in the browser.  I'm
using IE 6 for my browser.

How I get PHP to download this image?

Thanks!

Doug Coning




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



[PHP] Redirect...

2003-03-10 Thread Doug Coning
Hi all,

I'm running the below code to download a text file.  After the save as
window comes up, I can correctly save the document.  However, the browser
goes to a "Action Cancelled" error page.

Here's my code:



Am I suppose to redirect the page after it saves the file, and if so how
would I do that?

Thanks,

Doug Coning




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



[PHP] PHP removing data...

2003-03-08 Thread Doug Coning
Hi all,

I'm trying to save a text file from my server to a client machine through
PHP and am using the following headers:

header("Content-type: application/text");
header("Content-Disposition: attachment; filename=variables.txt");

The header does save a text file from the server to my desktop alright, but
it strips everything in the text file.  I have a file named variables.txt
with nothing in it.  I have uploaded a text file that does have test data in
it.  Furthermore, I set all the user rights in Unix to Read / Write/Execute
but everytime PHP opens or saves it, it does so without any of the variables
I've entered.

Does anyone have a suggestion as to what I'm doing wrong?

Thanks

Doug Coning




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



[PHP] Automatically Save Image?

2003-03-04 Thread Doug Coning
Hi,

I'm developing a flash site that uses PHP and MySQL to pull in images.  My
client would like to have a button in flash underneath the images he has
shown that would enable the viewer to download the images to their own
harddrive.

I know I could set it up to open the picture in a new window and have the
viewer 'right' click on it and select Save.  But is there anyway to automate
this so that Flash would open the URL that would automatically open the
"Save Picture" window for saving to the person's harddrive?

Thanks,

Doug Coning




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



[PHP] Save Image?

2003-01-06 Thread Doug Coning
Hi all,

I have a PHP page that returns products.  My client wants to have a button
beside each product that says "Download".  When you click download, he wants
the "Save Picture" Window box to automatically open and allow the viewer to
select the location to save the image that he clicked "DownLoad" on.

Is this possible with PHP?

Thanks,

Doug




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




[PHP] Multiple forms

2002-12-30 Thread Doug Coning
Hi all,

I have an update page that has a form in it.

However, I want to add another form in the same page.  My current form acts
upon itself (i.e. Action = the same page).  If I set up another form to do
the same, how would my PHP determine with action submit button was acted
upon?

Currently, for the single form here is how it knows a form was submitted:

if ((isset($HTTP_POST_VARS["MM_update"])) && ($HTTP_POST_VARS["MM_update"]
== "form1")) {

How would I test which form submitted the action?

Thanks and if I didn't make myself clear, I apologize.

Doug




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




Re: [PHP] Warning?

2002-12-30 Thread Doug Coning
Never mind.

http://www.agner.org/messageboards/docs/read-me.txt says that if there is a
space before the http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Warning?

2002-12-30 Thread Doug Coning
Hi everyone,

I'm using Dreamweaver to create an insert page and after the record is
inserted I receive this error:

Warning: Cannot add header information - headers already sent by (output
started at
/home/virtual/site8/fst/var/www/html/admin_gs/products_insert.php:2) in
/home/virtual/site8/fst/var/www/html/admin_gs/products_insert.php on line 62

Line 58 - 62 is as follows:

  if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));

This same code works in my update page without an error.

If you can help, thank you

Doug




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




[PHP] Is there a way to test for a file?

2002-10-08 Thread Doug Coning

Hi everyone,

I'm a PHP newbie and wanted to know if there is a way to test for a file.
The reason I'd like to do this is because I'm writing a query to return
items from a catalog.  However, if the client hasn't uploaded a picture or
if the picture is misteriously missing from the image folder, instead of
returning the product with the infamous missing jpeg picture, I would rather
the product be skipped altogether.

I'd like PHP to check to see if the image/picture.jpg exists before
returning the picture.  Is this possible?

Thanks!

Doug Coning
American Web Studio
www.americanwebstudio.com





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




[PHP] Another Pop-Up problem..

2002-06-26 Thread Doug Coning

Thanks all who have helped with my Javascript / PHP pop-up.

I've got it to work now where it will pop up a window.  However, now it
returns the same record each time.  So which ever record you click first, it
will bring that window up for each item.

How do I reset or clear out the value so that when you click a different
link it brings up the proper record.  You can see what I mean by visiting
the code at: http://www.coning.com/phptest/73things_view5.php.

Thanks!

Doug Coning


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




[PHP] Java Pop UP...

2002-06-26 Thread Doug Coning

Hi everyone...

I have a php page that return rows from a database.  I then have an href
link to the individual thread as such:

".


This works, it opens a new window which has the detailed information needed.
However, how would I write java code into this to force it to open the
window at 300 by 255?  I know the java code for this is as follows:

onclick="MM_openBrWindow('73things_thread.php','Thread','scrollbars=yes,widt
h=300,height=255')

How do I merge the java code into PHP?

Thanks!

Doug Coning
Coning Consulting


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




[PHP] Easy Date & MySQL Question...

2002-06-25 Thread Doug Coning

Hi everyone,

I have searched the php.net and don't know where to look for the code I
need.  I have a MySQL date column that reads this way: 2002-06-25.  However,
in PHP I want to show it this way 06/25/2002.

Any assistance is greatly appreciated!!!

Thanks in advance.

Doug Coning
Coning Consulting
www.coning.com


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