Jump to content

phpretard

Members
  • Posts

    821
  • Joined

  • Last visited

    Never

Posts posted by phpretard

  1. I know this is way off.

     

    I would like to count the results of the query.

     

    Could someone please help me with this?

     

    $result = mysql_query("SELECT * FROM registration WHERE league='Instructional' AND season='$season' AND year='$year' ORDER by player_last");
    
    while($row = mysql_fetch_array($result))
      {
    $result1 = count($result);
    }
    
    echo $result1;
    ?> 

     

    -Anthony

  2. I just want to make sure the question is clear, so...

     

    If I goto my index page and view source all the content is there.  In my editor the actual content is <? included ?>.  So I guess the question is...would the bot see <?included?> or the actuall content?

  3. I am trying to allow only pdf and jpeg files to be uploaded and as usual it doesn't work.  Here is the code im using.  I set the file size high to eliminate it as a problem.  I can't figure out what goes ($_FILES["ufile"]["type"] == "HERE/pdf")

    if ((($_FILES["ufile"]["type"] == "/pdf")
    || ($_FILES["ufile"]["type"] == "image/jpeg")
    || ($_FILES["ufile"]["type"] == "image/pjpeg"))
    && ($_FILES["ufile"]["size"] < 2000000000))
    

    any thoughts?

     

    I worked with it for a long time before I decided to bother you all with it.  Thank you for help!

     

    -Anthony

  4. I am considering advertising in an email newsletter.  This newsletter goes out to 70K "opted in" subscribers.  It's kind of expensive and I would like to track the hits on my site that came from the newsletter.  Is there a way to track hits that come from an email?  Beside a simple hit counter...Below is the only tracking method I know.  Any thoughts?

    <?php 
    echo $_SERVER['HTTP_REFERER']; 
    ?>

    -Ant

  5. I am puting together some registration pages for my sons baseball park.

     

    The park requires you pay through paypal before you can fill out the registration form. 

     

    No problem I just grab the "tx" that palpal sends back on the return to the site.

     

    If you have that on entering the page then your good else your not good. 

     

    After submission...the thank you page.  Here in lies the problem. 

     

    PROBLEM = Press the back button on the thank you page and you can fill in and submit the form again.

     

    Thank you all for your thought.

     

    -Anthony

  6. Here it is :)

     

    <script language="javascript" type="text/javascript">
    
    function validateForm(bd)
    {
    
    if(""==document.forms.bd.guest.value)
    {
    alert("We need to know how many will be are coming.");
    return false;
    }
    
    if(""==document.forms.bd.comment.value)
    {
    alert("Please send us a message with your R.S.V.P.");
    return false;
    }
    }
    </script>
    

  7. I have a database where the rows are named "email"  "instructional"  "tball"  "minor"  "major"  "prep"

    The value in these are either "yes" or they are empty.

     

    My objective is to send an email to the rows with a yes in them.

     

    Here is the code I have thus far:

     

    <?php                            <-----Line 1

    $to ="email@email.com";

    $subject =$_POST['subject'];

    $message = $_POST['body'];

     

    $username = 'sdfsdf';

    $password = 'ertert';

    $database = 'ertertert';

     

    //connect to database

    $con=mysql_connect('host.net', $username,$password);

    @mysql_select_db($database) or die("<b>Unable to specified database</b>");

     

     

    $where = '';

    if (!empty($_POST['cb']) && count($_POST['cb']))  {

      $where = 'WHERE 'id' IN ('. implode(', ', $_POST['cb']).')';

    }

     

    $query = "SELECT email FROM testemail . $where";

    $result=mysql_query($query) or die(mysql_error());

     

     

    mysql_close($con);

     

    Here is the form:

     

    <form>

    <input type=checkbox name="cb[instructional]"

    <input type=checkbox name="cb[tball]">

    <input type=checkbox name="cb['rookie']">

    <input type=checkbox name="cb['minor']">

    <input type=checkbox name="cb['major']">

    <input type=checkbox name="cb['prep']">

    <input type=checkbox name="cb['mom']">

    </form>

     

    Here is the eror:

     

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE yes IN (on)' at line 1

     

     

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