PHP error on my site

Discussion in 'PHP' started by jwhyte, Feb 15, 2006.

  1. #1
    After filling out the pop IN form on dontbesingle.com i get this error

    extra_ar is empty


    can anyone help???
     
    jwhyte, Feb 15, 2006 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,828
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #2
    Somewhere you are trying to use a variable called $extra_ar and it has no value so whatever you're doing falls over.

    You should be getting a line number. Can you post the code about 5 lines above and five lines below. Use the [ code ] vB tags :)
     
    sarahk, Feb 16, 2006 IP
  3. jwhyte

    jwhyte Banned

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey sarah thanks for the help your awsome.

    One questions what is that tag your talking about. I am assuming its something with my simplescript.php page. If I was to retrieve that line and post it do you think you could tell me what it is?

    <?php

    // Simple Form Script
    // Copyright (C) 2005
    // This program is free software; you can redistribute it and/or
    // modify it under the terms of the GNU General Public License
    // as published by the Free Software Foundation; either version 2
    // of the License, or (at your option) any later version.
    //
    //

    //--------------------------Set these paramaters--------------------------


    $subject = 'dontbesingle.com Link Exchange'; // Subject of email sent to you.
    $emailadd = 'info@dontbesingle.com'; // Your email address. This is where the form information will be sent.
    $url = 'http://www.dontbesingle.com'; // Where to redirect after form is processed.
    $req = '1'; // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.

    // --------------------------Do not edit below this line--------------------------
    $text = "Results from form:\n\n";
    $space = ' ';
    $line = '
    ';
    foreach ($_POST as $key => $value)
    {
    if ($req == '1')
    {
    if ($value == '')
    {echo "$key is empty";die;}
    }
    $j = strlen($key);
    if ($j >= 20)
    {echo "Name of form element $key cannot be longer than 20 characters";die;}
    $j = 20 - $j;
    for ($i = 1; $i <= $j; $i++)
    {$space .= ' ';}
    $value = str_replace('\n', "$line", $value);
    $conc = "{$key}:$space{$value}$line";
    $text .= $conc;
    $space = ' ';
    }
    mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
    echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    ?>
     
    jwhyte, Feb 17, 2006 IP
  4. sarahk

    sarahk iTamer Staff

    Messages:
    28,828
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #4
    The script checks that all the form values are filled in, or it dies.
    And somehow you have that empty variable sneaking in

    The form is totally written in javascript so you have to edit his file: http://dontbesingle.com/PopIn.js - on that very long first line you'll find
    <input type="hidden" name="extra_ar" value="">
    Code (markup):
    and either remove it or give it a value (eg 0)
     
    sarahk, Feb 17, 2006 IP
  5. jwhyte

    jwhyte Banned

    Messages:
    37
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thank you thank you thank you..

    I manage many high end PR sites that are auto related and directories..


    Internetautoguide.com
    Importtuner.com
    Hotrod.com
    Motortrend.com
    Newcar.com
    autobuyguide.com
    automallusa.net
    autoinsurancesaving.com
    carrebates.net


    Let me know if you wish to increase your link pop ok!!!
     
    jwhyte, Feb 22, 2006 IP