Conditional PHP Script to one of two graphic buttons
$30-100 USD
Terminado
Publicado hace más de 13 años
$30-100 USD
Pagado a la entrega
I have an existing PHP script on a membership site. I deliver large files to my members when they are ready to be downloaded from the download page.
I need a php script that will:
Check a hardwired directory to see of a certain file exists
example: [login to view URL]
IF that file exists, I want the script to display a particular download button along with the hyperlink info.
IF that file is NOT in the subdirectory, THEN display another not ready download button graphic with NO hyperlink info, IOW, just a graphic.
Both graphics already are in the sites' /images
The script will simply select the appropriate one to match the condition.
In VB6 it would be something like:
If DIR$(downloads/[login to view URL]) then
<p><a href=".downloads/[login to view URL]">
<img border="0" src="file:///C:/AutoBurnCD/website/AutoBurn%20CD/images/[login to view URL]" width="292" height="101"></a></p>
ELSE
<img border="0" src="file:///C:/AutoBurnCD/website/AutoBurn%20CD/images/[login to view URL]" width="292" height="101">
ENDIF
BUT I need to do it in PHP
That way if the file isn't uploaded yet, they won't get a file not found error.
I will insert the proper paths, etc, but make sure the code is well commented as I am not a PHP programmer, I am a VB6 programmer. Thanks
The dowload pg