/    Sign up×
Community /Pin to ProfileBookmark

? on veiwing files and automailer/cron

hiya, total newb here.

i have a form for uploading a file(image) into a folder. i am trying to write another form to display the file. my problem is that the user will not know the file extension, as there are several types being used. is there a way for them to just enter “image1” into the form and it check for that name in the folder without the extension or a way to check for multiple extensions?

next is one i am totally lost on. i’ve never used a cron or an automailer so i am lost as to where to even start.

i need to check the db twice a day, check 2 columns and send an email if the criteria is met. i also need to make sure it doesn’t send the emails more than once a day. would you have the cron output to a file and then have another script run the automailer? or is there a way to do it all in one step? my server has an autoresponder built in. do i use that or just code it into the php?

thanks for any and all help. if anyone has any good suggestions for books, i;m on it. been using php & sql by Vaswani. it has been helpful, but i need more detaled stuff for what i’m working on.

thanks again and sorry for the long post..

Chris

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@buconineauthorNov 13.2006 — ok, i got the view file script to work except i get a blank screen instead of my image. do i have to do something specific to load a pdf or rtf file? everything works but it won't display the image.

still scatching my head on the cron deal. found this while searching the forums.

http://www.webdeveloper.com/forum/showthread.php?t=125077

can i use this script? is there a way to use it when the db only has the email addy? how would i go about using that with a form letter?

thanks for any help!
Copy linkTweet thisAlerts:
@buconineauthorNov 24.2006 — ok, been reading the manual...

would this work and is it actually creating a new pdf or is it opening a current pdf? will this work with a form?

would appreciate anything at this point...

http://www.php.net/manual/en/function.pdf-open-image-file.php
Copy linkTweet thisAlerts:
@buconineauthorDec 02.2006 — ok, here is my code:

[code=php]<?php



if (!$_POST['submit'])



{

?>



<form action = "<?=$_SERVER['PHP_SELF'] ?>" method = "post">

Image Number <input type = "text" name = "img_num">



<input type = "submit" name = "submit" value = "search">



</form>



<?php

}

else



$img_num = ($_POST['img_num']);


echo '<img src= /home/images/$img_num.pdf >';

?>[/code]



i get a blank screen after inputting a number and hitting submit. looking at view source it is showing: <img src= /home/images/$img_num.pdf >

what am i doing wrong?
Copy linkTweet thisAlerts:
@buconineauthorDec 02.2006 — 250 views and no one can throw me a bone?

help please, i'm runnin out of hair to pull out! lol



i have a cron running on my host twice a day. if a criteria is met, it sends out the email properly, but it continues to send out the email after it was already sent once. is there a way to set the cron up to send the email out once to that address? is there a way to check if the email was already sent? output to temp file and then have the cron check the mail?

thanks for any help!

Chris
×

Success!

Help @buconine spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...