Jump to content

? on veiwing files and automailer/cron


buconine

Recommended Posts

hello, i'm trying to view a pdf file off a form and got the form working, but when you submit the form i just get the html from the page, no php. here is the code. any ideas?
[code]<?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]

and the cron question is: i have a cron running twice a day on my host. it sends an email once a criteria is met. unfortunatly it keeps sending the email. is there a way to have it only email that address once then skip it next time it checks the database?

thanks for the help. i am just learning sql/php and it is pretty challenging to a newb!

Link to comment
https://forums.phpfreaks.com/topic/29234-on-veiwing-files-and-automailercron/
Share on other sites

hmm, now i am getting errors with my cron.
the error is: Warning</b>:  mysql_num_rows(): supplied argument is not a valid MySQL result resource
for this line of code: if (mysql_num_rows($result) > 0) {
being used in a select statement which in my books should be a legal statement.

any ideas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.