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
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.