No error messages in php

Hi!
I have an old computer witch I have installed apache, php and mysql. Every thing is working except from one thing (so far). I have tested that php works, but my problem is that I don't get any error messages back from the server if there is an error in my code. Can anybody please help me with getting my sweet, sweet errors:P

Well, I'd look for an answer in Error Handling and Logging Functions chapter of PHP manual

Similar Messages

  • Strange error messages in PHP log on azure website

    Hi,
    I have a PHP website (SMF Forum) that runs for more than a year now (not in one run,  but I never experienced this error before). After complaints about time-outs, blank pages and other odd behavior I found this in the log files:
    lots of error messages like this one:
    PHP Fatal error:  Failure in Wincache[4280] free_memory: Block 0x3c1827c not in use
    And this one:
    PHP Fatal error:  WINCACHE: lock_readlock: acquired abandoned mutex Global\FILELIST_CACHE_5.4_1.3.7.4_1_0_850133_X. Something bad happend in another process! in Unknown on line 0
    Stopping/starting the website did solve the problem but I am curious what could cause this and if there is something I can do to prevent this.
    Best regards,
    Arthur

    In WinCache 1.3.7.4, I improved the diagnostics & tracing surrounding issues which previously led to memory corruptions in the shared memory segments of the WinCache caches (File, Session, User, Opcode).  Further, I improved detection and avoidance
    of AVs in this same area.  The trace messageyou're seeing,  "free_memory: Block <N> not in use", is proof that WinCache detected a corruption (it was attempting to free a shared memory block that wasn't in use), and avoided further
    corruption (it didn't try to free the not-free memory block, which would have led to even greater corruption).
    The second message, "lock_readlock: acquired abandoned mutex..." indicates that another php-cgi.exe process crashed while holding a mutex that WinCache uses.  In this case, it's the lock for the File cache.
    To diagnose, look at the line of PHP code mentioned in the "free_memory: Block <N> not in use" message.  If one of the following functions is on that line, there is a work around:
    ◦ file_exists 
    ◦ file_get_contents 
    ◦ readfile 
    ◦ is_readable 
    ◦ is_writable 
    ◦ is_dir 
    ◦ realpath 
    ◦ filesize
    If it's one of these functions, then I would recommend setting wincache.reroute_enabled=0 in your .user.ini.
    Thx!
        --E.

  • I get an error message when I compile the following.

    When I try to compile the following with Forte for Java I get an error
    import com.ms.security.*;
    import java.io.*;
    import java.net.*;
    import java.lang.Runtime;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;
    import java.applet.Applet;
    import java.text.*;
    import java.util.Enumeration;
    import java.applet.*;
    import java.*;
    public class php extends java.applet.Applet {
    public void init ()
    private eector postResult()
    throws MalformedURLException , IOException
    URL url;
    URLConnection con;
    OutputStream oStream;
    String parameterAsString;
    byte [] parameterAsBytes;
    String aLine;
    parameterAsString = "x=2&y=2&z=2";
    parameterAsBytes = parameterAsString.getBytes();
    url = this.getCodeBase();
    url = new URL(url + "index.php3");
    con = url.openConnection();
    con.setDoOutput(true);
    con.setDoInput(false);
    con.setRequestProperty("Content=length",String.valueOf(parameterAsBytes.length));
    oStream = con.getOutputStream();
    oStream.write (parameterAsBytes);
    oStream.flush();
    BufferedReader in =new BufferedReader(new InputStreamReader(con.getInputStream()));
    aLine= in.readLine();
    while (aLine != null)
    System.out.println();
    aLine = in.readLine();
    in.close();
    oStream.close();
    The error message is
    php.java [22:1] cannot resolve symbol
    symbol : class eector
    location: class php
    private eector postResult()
    ^
    1 error
    Erros compiling php.
    Please help

    Is the postResult function supposed to return somthing (I don't see a return statement?). If not replace eector with void. If it returns something replace it with the type of the returned data wich might be Vector (mind the Cap).

  • Muse form is not working on godaddy and no error message indicating a php error is occuring. Could something else be wrong? Do I have to manually set the form once loaded to go daddy to direct through their mail form system?

    I have read in multiple places on the forum that muse forms are now supported on third party platforms. however I am having a very difficult time getting mine to work on Godaddy. They seem to no longer have the "form mailer" option and told me to look at this PHP: mail - Manual to make the forms work. Muse is not giving any error messages indicating that there is a problem on the go daddy end, the form appears to function but no message is received at email address. can anyone help troubleshoot this for me.
    Thanks.

    Hey Sanjit & Brad,
    Thanks for getting back to me. So, I tried changing the address as Sanjit suggested, and yes an error message came up. But then I tested Brad's theory and looks like the form works with another email address other than that of the actual website email:( So I guess based on Brad's link I should reroute the form to the other (non-godaddy) email...or contact go-daddy to see if they can correct this? Would that be the final answer?
    Thanks again!

  • Error message when I run searches on my website (PHP/MySQL help)

    Hey guys, can someone tell me why this is happening in my PHP? I run a search on my website and get this error message ye sI filled the hostname, username and password)
    Results for
    PHP Error Message
    Warning:  mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a8295382/public_html/Search Results.php on line 233
    Couldn't execute query
    Here is my PHP code:
    <?php
    $hostname_logon = "host" ;
    $database_logon = "hostname" ;
    $username_logon = username" ;
    $password_logon = "password" ;
    //open database connection
    $connections = mysql_connect($hostname_logon, $username_logon, $password_logon) or die ( "Unabale to connect to the database" );
    //select database
    mysql_select_db($database_logon) or die ( "Unable to select database!" );
    //specify how many results to display per page
    $limit = 15;
    //get the search variable from URL
    $var = mysql_real_escape_string(@$_REQUEST['q']);
    //get pagination
    $s = mysql_real_escape_string($_REQUEST['s']);
    //set keyword character limit
    if(strlen($var) < 3){
        $resultmsg =  "<p>Search Error</p><p>Keywords with less then three characters are omitted...</p>" ;
    //trim whitespace from the stored variable
    $trimmed = trim($var);
    $trimmed1 = trim($var);
    //separate key-phrases into keywords
    $trimmed_array = explode(" ",$trimmed);
    $trimmed_array1 = explode(" ",$trimmed1);
    // check for an empty string and display a message.
    if ($trimmed == "") {
        $resultmsg =  "<p>Search Error</p><p>Please enter a search...</p>" ;
    // check for a search parameter
    if (!isset($var)){
        $resultmsg =  "<p>Search Error</p><p>We don't seem to have a search parameter! </p>" ;
    // Build SQL Query for each keyword entered
    foreach ($trimmed_array as $trimm){
    // EDIT HERE and specify your table and field names for the SQL query
    // MySQL "MATCH" is used for full-text searching. Please visit mysql for details.
    $query = "SELECT * , MATCH (field1, field2) AGAINST ('".$trimm."') AS score FROM table_name WHERE MATCH (field1, field2) AGAINST ('+".$trimm."') ORDER BY score DESC";
    // Execute the query to  get number of rows that contain search kewords
    $numresults=mysql_query ($query);
    $row_num_links_main =mysql_num_rows ($numresults);
    //If MATCH query doesn't return any results due to how it works do a search using LIKE
    if($row_num_links_main < 1){
        $query = "SELECT * FROM table_name WHERE field1 LIKE '%$trimm%' OR field2 LIKE '%$trimm%'  ORDER BY field3 DESC";
        $numresults=mysql_query ($query);
        $row_num_links_main1 =mysql_num_rows ($numresults);
    // next determine if 's' has been passed to script, if not use 0.
    // 's' is a variable that gets set as we navigate the search result pages.
    if (empty($s)) {
         $s=0;
      // now let's get results.
      $query .= " LIMIT $s,$limit" ;
      $numresults = mysql_query ($query) or die ( "Couldn't execute query" );
      $row= mysql_fetch_array ($numresults);
      //store record id of every item that contains the keyword in the array we need to do this to avoid display of duplicate search result.
      do{
          $adid_array[] = $row[ 'field_id' ];
      }while( $row= mysql_fetch_array($numresults));
    } //end foreach
    //Display a message if no results found
    if($row_num_links_main == 0 && $row_num_links_main1 == 0){
        $resultmsg = "<p>Search results for: ". $trimmed."</p><p>Sorry, your search returned zero results</p>" ;
    //delete duplicate record id's from the array. To do this we will use array_unique function
    $tmparr = array_unique($adid_array);
    $i=0;
    foreach ($tmparr as $v) {
       $newarr[$i] = $v;
       $i++;
    //total result
    $row_num_links_main = $row_num_links_main + $row_num_links_main1;
    // now you can display the results returned. But first we will display the search form on the top of the page
    echo '<form action="search.php" method="get">
            <div>
            <input name="q" type="text" value="'.$q.'">
            <input name="search" type="submit" value="Search">
            </div>
    </form>';
    // display an error or, what the person searched
    if( isset ($resultmsg)){
        echo $resultmsg;
    }else{
        echo "<p>Search results for: <strong>" . $var."</strong></p>";
        foreach($newarr as $value){
        // EDIT HERE and specify your table and field unique ID for the SQL query
        $query_value = "SELECT * FROM newsight_articles WHERE field_id = '".$value."'";
        $num_value=mysql_query ($query_value);
        $row_linkcat= mysql_fetch_array ($num_value);
        $row_num_links= mysql_num_rows ($num_value);
        //create summary of the long text. For example if the field2 is your full text grab only first 130 characters of it for the result
        $introcontent = strip_tags($row_linkcat[ 'field2']);
        $introcontent = substr($introcontent, 0, 130)."...";
        //now let's make the keywods bold. To do that we will use preg_replace function.
        //Replace field
          $title = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" , $row_linkcat[ 'field1' ] );
          $desc = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" , $introcontent);
          $link = preg_replace ( "'($var)'si" , "<strong>\\1</strong>" ,  $row_linkcat[ 'field3' ]  );
            foreach($trimmed_array as $trimm){
                if($trimm != 'b' ){
                    $title = preg_replace( "'($trimm)'si" ,  "<strong>\\1</strong>" , $title);
                    $desc = preg_replace( "'($trimm)'si" , "<strong>\\1</strong>" , $desc);
                    $link = preg_replace( "'($trimm)'si" ,  "<strong>\\1</strong>" , $link);
                 }//end highlight
            }//end foreach $trimmed_array
            //format and display search results
                echo '<div class="search-result">';
                    echo '<div class="search-title">'.$title.'</div>';
                    echo '<div class="search-text">';
                        echo $desc;
                    echo '</div>';
                    echo '<div class="search-link">';
                    echo $link;
                    echo '</div>';
                echo '</div>';
        }  //end foreach $newarr
        if($row_num_links_main > $limit){
        // next we need to do the links to other search result pages
            if ($s >=1) { // do not display previous link if 's' is '0'
                $prevs=($s-$limit);
                echo '<div class="search_previous"><a href="'.$PHP_SELF.'?s='.$prevs.'&q='.$var.'">Previous</a>
                </div>';
        // check to see if last page
            $slimit =$s+$limit;
            if (!($slimit >= $row_num_links_main) && $row_num_links_main!=1) {
                // not last page so display next link
                $n=$s+$limit;
                echo '<div  class="search_next"><a href="'.$PHP_SELF.'?s='.$n.'&q='.$var.'">Next</a>
                </div>';
        }//end if $row_num_links_main > $limit
    }//end if search result
    ?>
    Anyone got any ideas as to why this is happening?
    Also, I have not created any tables in my database... is this why it doesn't display any search results from my website?

    Sorry, but it doesn't help JTANNA.
    What is your definition of "more efficiently"? If it's limitation of search results, branded search, and limitation of styling your results then google search is more efficient. Real developers rely on their own developments. For example: how can google search display results from a password-protected site? They can't.
    best,
    Shocker

  • PHP/MySql Error Message

    I've posted this before and didn't get the answer that I need, probably because I didn't post all of my codes. I am using PHP/MySql.  I created a website that has several forms.  When I process three of the forms, I get the error messages below:
    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 'Condition, Length, Color, City, `State`, Email, Photo) VALUES ('29', '4', 'Used'' at line 1.
    Below I am posting the codes.  Hopefully, this time I posted everything that I should have so that I can get assistance.   
    FORM
    <form action="<?php echo $editFormAction; ?>" method="POST" enctype="multipart/form-data" name="individual" class="individual" id="individual">
      <table width="594" border="0" class="test">
      <tr></tr>
      <tr>
        <td width="166" class="td">Posting Title</td>
        <td colspan="3"><span id="sprytextfield1">
          <label>
            <input name="Posting Title" type="text" class="test" id="Posting Title" size="35" />
            </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
      </tr>
      <tr>
        <td class="td">Price</td>
        <td colspan="3"><span id="sprytextfield2">
          <label>
            <input name="price" type="text" class="test" id="price" size="35" />
          </label>
          <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
      </tr>
      <tr>
        <td class="td">Size(s)</td>
        <td colspan="3"><label>
          <select name="size" size="1" multiple="multiple" class="test" id="size">
    <option>0</option>
            <option>2</option>
            <option>4</option>
            <option>6</option>
            <option>8</option>
            <option>10</option>
            <option>12</option>
            <option>14</option>
            <option>16</option>
            <option>18</option>
            <option>20</option>
            <option>22</option>
            <option>24</option>
            <option>26</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Condition</td>
        <td colspan="3"><label>
          <select name="Condition" class="test" id="Condition">
    <option>New</option>
            <option>Used</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Length</td>
        <td colspan="3"><label>
          <select name="Length" class="test" id="Length">
    <option>Long</option>
    <option>Short</option>
    <option>Mid-Length</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Color</td>
        <td colspan="3" class="td"><span id="sprytextfield5">
          <label>
            <input name="Color" type="text" class="test" id="Color" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
      </tr>
      <tr>
        <td class="td">City</td>
        <td class="td"><span id="sprytextfield4">
          <label>
            <input name="City" type="text" class="test" id="City" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
        <td class="td"> </td>
        <td class="td"> </td>
      </tr>
      <tr>
        <td class="td">State</td>
        <td colspan="3"><label>
          <select name="State" class="test" id="State">
            <option>AL</option>
            <option>AK</option>
            <option>AZ</option>
            <option>AR</option>
            <option>CA</option>
            <option>CO</option>
            <option>CT</option>
            <option>DE</option>
            <option>DC</option>
            <option>FL</option>
            <option>GA</option>
            <option>HI</option>
            <option>ID</option>
            <option>IL</option>
            <option>IN</option>
            <option>IA</option>
            <option>KS</option>
            <option>KY</option>
            <option>LA</option>
            <option>ME</option>
            <option>MD</option>
            <option>MA</option>
            <option>MI</option>
            <option>MN</option>
            <option>MS</option>
            <option>MO</option>
            <option>MT</option>
            <option>NE</option>
            <option>NV</option>
            <option>NH</option>
            <option>NJ</option>
            <option>NM</option>
            <option>NY</option>
            <option>NC</option>
            <option>ND</option>
            <option>OH</option>
            <option>OK</option>
            <option>OR</option>
            <option>PA</option>
            <option>RI</option>
            <option>SC</option>
            <option>SD</option>
            <option>TN</option>
            <option>TX</option>
            <option>UT</option>
            <option>VT</option>
            <option>VA</option>
            <option>WA</option>
            <option>WV</option>
            <option>WI</option>
            <option>WY</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Email</td>
        <td colspan="3"><span id="sprytextfield3">
          <label>
            <input name="Email" type="text" class="test" id="Email" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
      </tr>
      <tr>
        <td height="26" class="td">Confirm Email</td>
        <td colspan="3"><span id="spryconfirm1">
          <label>
            <input name="Confirm Email2" type="text" class="test" id="Confirm Email2" size="35" />
          </label>
          <span class="confirmRequiredMsg">Required</span><span class="confirmInvalidMsg">The values don't match.</span></span></td>
      </tr>
      <tr>
        <td height="26" class="td">Photo(s)</td>
        <td colspan="3"><label>
          <input name="Photo" type="file" class="test" id="Photo" size="35" />
        </label></td>
      </tr>
      <tr>
        <td height="131" class="td">Additional Details</td>
        <td colspan="3"><label>
          <textarea name="Additional Details" cols="40" rows="6" class="test" id="Additional Details"></textarea>
        </label></td>
      </tr>
      </table>
      <p>
        <label>
          <input name="Submit" type="submit" class="test" id="Submit" value="Post" />
        </label>
      </p>
      <input type="hidden" name="MM_insert" value="individual" />
    </form>
    SERVER BEHAVIOR
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "individual")) {
      $insertSQL = sprintf("INSERT INTO donations (postingTitle, `size`, condition, length, color, city, `state`, email, photo) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['Posting Title'], "text"),
                           GetSQLValueString($_POST['size'], "text"),
                           GetSQLValueString($_POST['Condition'], "text"),
                           GetSQLValueString($_POST['Length'], "text"),
                           GetSQLValueString($_POST['Color'], "text"),
                           GetSQLValueString($_POST['City'], "text"),
                           GetSQLValueString($_POST['State'], "text"),
                           GetSQLValueString($_POST['Email'], "text"),
                           GetSQLValueString($_POST['Photo'], "text"));
      mysql_select_db($database_bridesmaidsrack_db, $bridesmaidsrack_db);
      $Result1 = mysql_query($insertSQL, $bridesmaidsrack_db) or die(mysql_error());
      $insertGoTo = "donations.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    DATABASE CONNECTION
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_bridesmaidsrack_db = "localhost";
    $database_bridesmaidsrack_db = "bridesmaidsrack";
    $username_bridesmaidsrack_db = "";
    $password_bridesmaidsrack_db = "";
    $bridesmaidsrack_db = mysql_pconnect($hostname_bridesmaidsrack_db, $username_bridesmaidsrack_db, $password_bridesmaidsrack_db) or trigger_error(mysql_error(),E_USER_ERROR);

    Hi David,
    I did as you recommended. For good measure, I even changed the case of the letters to make sure that they coincide with exactly what's in the database.  I still kept getting the same error message.  So I deleted the recordset and attempted to recreate it.  When I attempted to recreate the record set, I got the following error message: "RangeError: invalid array length".  My codes are listed below:
    Form:
    <form method="POST" enctype="multipart/form-data" name="individual" class="individual" id="individual">
      <table width="594" border="0" class="test">
      <tr></tr>
      <tr>
        <td width="166" class="td">Posting Title</td>
        <td colspan="3"><span id="sprytextfield1">
          <label>
            <input name="posting_title" type="text" class="test" id="posting_title" size="35" />
            </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
      </tr>
      <tr>
        <td class="td">Size(s)</td>
        <td colspan="3"><label>
          <select name="size" size="1" multiple="multiple" class="test" id="size">
      <option>0</option>
            <option>2</option>
            <option>4</option>
            <option>6</option>
            <option>8</option>
            <option>10</option>
            <option>12</option>
            <option>14</option>
            <option>16</option>
            <option>18</option>
            <option>20</option>
            <option>22</option>
            <option>24</option>
            <option>26</option>
            </select>
          <span class="Text">To select multiple sizes, hold ctrl and select each size.</span></label></td>
      </tr>
      <tr>
        <td class="td">Condition</td>
        <td colspan="3"><label>
          <select name="condition" class="test" id="condition">
    <option>New</option>
            <option>Used</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Length</td>
        <td colspan="3"><label>
          <select name="length" class="test" id="length">
    <option>Long</option>
    <option>Short</option>
    <option>Mid-Length</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Color(s)</td>
        <td colspan="3" class="td"><span id="sprytextfield5">
          <label>
            <input name="color" type="text" class="test" id="color" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
      </tr>
      <tr>
        <td class="td">City</td>
        <td class="td"><span id="sprytextfield4">
          <label>
            <input name="city" type="text" class="test" id="city" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span></span></td>
        <td class="td"> </td>
        <td class="td"> </td>
      </tr>
      <tr>
        <td class="td">State</td>
        <td colspan="3"><label>
          <select name="state" class="test" id="state">
            <option>AL</option>
            <option>AK</option>
            <option>AZ</option>
            <option>AR</option>
            <option>CA</option>
            <option>CO</option>
            <option>CT</option>
            <option>DE</option>
            <option>DC</option>
            <option>FL</option>
            <option>GA</option>
            <option>HI</option>
            <option>ID</option>
            <option>IL</option>
            <option>IN</option>
            <option>IA</option>
            <option>KS</option>
            <option>KY</option>
            <option>LA</option>
            <option>ME</option>
            <option>MD</option>
            <option>MA</option>
            <option>MI</option>
            <option>MN</option>
            <option>MS</option>
            <option>MO</option>
            <option>MT</option>
            <option>NE</option>
            <option>NV</option>
            <option>NH</option>
            <option>NJ</option>
            <option>NM</option>
            <option>NY</option>
            <option>NC</option>
            <option>ND</option>
            <option>OH</option>
            <option>OK</option>
            <option>OR</option>
            <option>PA</option>
            <option>RI</option>
            <option>SC</option>
            <option>SD</option>
            <option>TN</option>
            <option>TX</option>
            <option>UT</option>
            <option>VT</option>
            <option>VA</option>
            <option>WA</option>
            <option>WV</option>
            <option>WI</option>
            <option>WY</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td class="td">Email</td>
        <td colspan="3"><span id="sprytextfield3">
          <label>
            <input name="email" type="text" class="test" id="email" size="35" />
          </label>
          <span class="textfieldRequiredMsg">Required</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
      </tr>
      <tr>
        <td height="26" class="td">Confirm Email</td>
        <td colspan="3"><span id="spryconfirm1">
          <label>
            <input name="confirm_email2" type="text" class="test" id="confirm_email2" size="35" />
          </label>
          <span class="confirmRequiredMsg">Required</span><span class="confirmInvalidMsg">The values don't match.</span></span></td>
      </tr>
      <tr>
        <td height="26" class="td">Photo(s)</td>
        <td colspan="3"><label>
          <input name="Photo" type="file" class="test" id="Photo" size="35" />
        </label></td>
      </tr>
      <tr>
        <td height="131" class="td">Additional Details</td>
        <td colspan="3"><label>
          <textarea name="Additional Details" cols="40" rows="6" class="test" id="Additional Details"></textarea>
          <input name="hiddenField" type="hidden" id="hiddenField" value="Date" />
        </label></td>
      </tr>
      </table>
      <p>
        <label>
          <input name="Submit" type="submit" class="test" id="Submit" value="Post" />
        </label>
      </p>
    </form>
    Server Behavior
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "individual")) {
      $insertSQL = sprintf("INSERT INTO donations (posting_title, `size`, condition, length, color, city, `state`, email, photo) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['posting_title'], "text"),
                           GetSQLValueString($_POST['size'], "text"),
                           GetSQLValueString($_POST['condition'], "text"),
                           GetSQLValueString($_POST['length'], "text"),
                           GetSQLValueString($_POST['color'], "text"),
                           GetSQLValueString($_POST['city'], "text"),
                           GetSQLValueString($_POST['state'], "text"),
                           GetSQLValueString($_POST['email'], "text"),
                           GetSQLValueString($_POST['Photo'], "text"));
      mysql_select_db($database_bridesmaidsrack_db, $bridesmaidsrack_db);
      $Result1 = mysql_query($insertSQL, $bridesmaidsrack_db) or die(mysql_error());
      $insertGoTo = "donations.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));

  • PHP Form causing error message

    Hi,
    I am trying to create a page whereby users can fill in their details so I can transfer them into a business card. It's basically just a slightly modified version of my Contact form, which works fine. Yet for some reason it's spitting out this error message:
    "Warning: Invalid argument supplied for foreach() in /home/reasona2/public_html/business_cards/pages/businesscard.php on line 17 
    Warning: Cannot modify header information - headers already sent by (output started at /home/reasona2/public_html/business_cards/pages/businesscard.php:17) in /home/reasona2/public_html/business_cards/pages/businesscard.php on line 29" 
    I'm using the following HTML: 
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Business Cards</title>
    <link href="rpw1.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    //-->
    </script>
    <form action="businesscard.php" method="post">
    </head> 
    <body onload="MM_preloadImages('buttons/home2.png','buttons/services2.png','buttons/prices2.png ','buttons/examples2.png','buttons/contact2.png','business_cards/classic_contemporary_whit e.jpg','business_cards/classic_contemporary_black.jpg','business_cards/classic_contemporar y_cream.jpg')">
    <div id="header"><img src="header_background.png" width="850" height="27" /></div>
    <div id="wrapper">
      <div id="banner">
        <div id="phone">
          <p class="bold_centre">Call us now on:</p>
          <p><img src="phone.png" width="16" height="13" /> 0845 567 413</p>
        </div>
      </div>
      <div id="menu"><a href="home.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home','','buttons/home2.png',1)"><img src="buttons/home.png" name="Home" width="116" height="40" border="0" id="Home" /></a><a href="services.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Services','','buttons/services2.png',1)"><img src="buttons/services.png" name="Services" width="116" height="40" border="0" id="Services" /></a><a href="prices.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Prices','','buttons/prices2.png',1)"><img src="buttons/prices.png" name="Prices" width="116" height="40" border="0" id="Prices" /></a><a href="examples.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Examples','','buttons/examples2.png',1)"><img src="buttons/examples.png" name="Examples" width="116" height="40" border="0" id="Examples" /></a><a href="jobs.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Jobs','','buttons/jobs2.png',0)"><img src="buttons/jobs.png" name="Jobs" width="116" height="40" border="0" id="Jobs" /></a><a href="contact.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Contact','','buttons/contact2.png',1)"><img src="buttons/contact.png" name="Contact" width="116" height="40" border="0" id="Contact" /></a>
    <p> </p>
      </div>
      <div id="main">
        <div id="page_header">
        <h2>Classic: Contemporary</h2>
        </div>
        <div id="card_gallery_div">
          <div id="card_main"><img src="business_cards/classic_contemporary_white.jpg" name="card_large" width="378" height="529" id="card_large" /></div>
          <div id="card_description">
            <p>Description of card to go here</p>
          </div>
          <div id="card_choices">
            <form action="" method="post" enctype="multipart/form-data" name="form2" id="form2">
              <p>Please choose from the following colour options:
                <br />
              </p>
              <p> </p>
              <p><img src="business_cards/colour_blocks/white.jpg" alt="" name="block1" width="40" height="40" id="block1" />
                <input name="radio" type="radio" id="white" onclick="MM_swapImage('card_large','','business_cards/classic_contemporary_white.jpg',1)" value="white" checked="checked" />
                White  <img src="business_cards/colour_blocks/black.jpg" alt="" name="block2" width="40" height="40" id="block2" />
                <input name="radio" type="radio" id="black" onclick="MM_swapImage('card_large','','business_cards/classic_contemporary_black.jpg',1)" value="black" />
                Black  <img src="business_cards/colour_blocks/cream.jpg" alt="" name="block3" width="40" height="40" id="block3" />
                <input name="radio" type="radio" id="cream" onclick="MM_swapImage('card_large','','business_cards/classic_contemporary_cream.jpg',1)" value="cream" />
              Cream</p>
              <p> </p>
    <p>Please provide the following information as you would like it to appear on your new Business Cards:</p>
              <p> </p>
              <p>Name:</p>
              <p>
                <input name="name" type="text" id="name" size="45" />
              </p>
              <p> </p>
              <p>Job Title:</p>
              <p>
                <input name="job" type="text" id="job" size="45" />
              </p>
              <p> </p>
              <p>Tel No:</p>
              <p>
                <input name="phone" type="text" id="phone2" size="45" />
              </p>
              <p> </p>
              <p>Mobile No:</p>
              <p>
                <input name="mobile" type="text" id="mobile" size="45" />
              </p>
              <p> </p>
              <p>Email:</p>
              <p>
                <input name="email" type="text" id="email" size="45" />
              </p>
              <p> </p>
              <p>Website:</p>
              <p>
                <input name="website" type="text" id="website" size="45" />
              </p>
              <p> </p>
              <p>Upload Logo: </p>
              <p>(Please ensure all files are minimum 150dpi)</p>
              <p>
                <input name="file" type="file" id="file" />
              </p>
              <p>           </p>
              <p>
                <input type="submit" name="submit" id="submit" value="Submit" />
              </p>
            </form> 
    With the following PHP script: 
    <?php
    if(isset($_POST['submit'])) { 
    $to = "[email protected]";
    $subject = "Business Card Order";
    $method = $_POST['radio'];
    $name_field = $_POST['name'];
    $job_field = $_POST['job'];
    $phone_field = $_POST['phone'];
    $mob_field = $_POST['mobile'];
    $email_field = $_POST['email'];
    $web_field = $_POST['website'];
    $address_field = $_POST['address']; 
    foreach($_POST['check'] as $value) { 
    $check_msg .= "\n$value\n"; 
    $body = "Business Card Colour: $method\n\n Name: $name_field\n\n Job Title: $job_field\n\n Phone: $phone_field\n\n Mobile: $mob_field\n\n E-Mail: $email_field\n\n Website: $web_field\n\n Address: $address_field "; 
    $header="From: $email_field\r\n"; 
    mail($to, $subject, $body,$header); 
    header("Location: businesscard_thanks.html"); 
    } else { 
    echo "blarg!"; 
    ?> 
    Can anyone help fix the PHP so the error message goes away? 
    I'd also like to include an option for users to upload a file so they can supply a logo if they want to. I've already got the HTML side of that sorted, but can anybody advise what to do with the PHP? 
    Thanks very much in advance! 
    Oli Corse

    The error message is pretty clear:
    Warning: Invalid argument supplied for foreach() in /home/reasona2/public_html/business_cards/pages/businesscard.php on line 17
    It refers to this section of code:
    foreach($_POST['check'] as $value) {
      $check_msg .= "\n$value\n";
    I can find no form elements with the name check[]. To use foreach, it must be an a valid array.
    It's difficult for others to pick through such a morass of code, but one thing I noticed is that you have an opening form tag inside the head of the page. Before asking for help in a forum, it's always a good idea to validate your code.
    I'd also like to include an option for users to upload a file so they can supply a logo if they want to. I've already got the HTML side of that sorted, but can anybody advise what to do with the PHP?
    There are instructions on how to upload images to a website in the Dreamweaver Cookbook here: http://cookbooks.adobe.com/post_Upload_image_to_website__PHP_-16389.html. The article doesn't cover how to attach the image to an email. The standard PHP mail() function doesn't handle attachments.

  • When I try to access links on Google Books I get thsi error message -Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch Server at books.google.co.uk Port 80 - Cna anyone help?

    This is the error message that I get.
    This is the error message that I get
    Not Found
    The requested URL /books was not found on this server.
    Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch Server at books.google.co.uk Port 80
    There is no problem if I use Internet Explorer.
    My wife uses Yahoo mail and I just use Firefox.
    Thanks

    I have exactly the same problem. I also have the same problem on other web sites, for example when opening a few of the description pages on e-Bay. It appears to be inconsistent as if there is some sort of timing issue as on a few odd occasions I have managed to open Yahoo.
    This started about 3 weeks ago when I was running 3.6.21 and the problem persists after I updated to 3.6.22.
    I am concerned at the lack of response from Mozilla/Firefox as this seems to be a well established problem with several hundred problems reported - but no solution.
    Perhaps the easiest solution is for the users to turn our backs on Firefox and use Opera or Google Chrome instead.

  • When I tried to run php file I am getting the following error message, "/home/karthick/Desktop/PHP files/third.php could not be opened, because the associated helper application does not exist. Change the association in your preferences." How to fix this?

    When I tried to run php file I am getting the following error message, "/home/karthick/Desktop/PHP files/third.php could not be opened, because the associated helper application does not exist. Change the association in your preferences." How to fix this?

    first, you just asked me to use MS file Explorer to see what the properties were.,..and to ask what happened. Yes - that's on my hard drive. The problem I have is opening word files in a DB that is web enabled.....I've used Firefox browser for that, and everything else , for years...... When I look at the Tools, and options on FireFox., as your support page noted.....NOTHING is listed in the Applications tab....hence my note asking for help. The file I need to open is a Word file out on a web enabled DB. It's not on my hard drive - I have to problems opening docs there - but for that, I don't use Firefox

  • Help with php/cookies login error message

    Hi
    I'm working in DreamWeaver CS4, On a Mac 10.04 OSX system. I am using php and a cookies if (isset) function
    Im  trying to create and error message for users who try to login to the site. but can't because there is no connection to the database as of yet.
    I have a connect srcript and a login script as well as the login and registration page.
         when the user tries to login in I get a syntax error mesage instead of getting the phrase," A problem connecting to the data base. Please try again later."
    How can I resolve this issue, Thanks your help it is greatly appreciated. To view the php code/connect script used in the login registration follow this link the script will available there. http://http://www.camtamkalaboration.com/products.php

    jarmelo wrote:
    how would I go about upgrading from tiger to  leopard?
    Buy Leopard, insert disk, follow instructions.
    You can instal php (which is built into Leopard) by renaming a file and uncommenting a line then enabling web sharing in System Preferences but I use entropy because it has the GD enabled for CAPTCHA and other features. There's a 10.4 version on their website but it mentions it's an older, unsupported and probably insecure version. You should use entropy Leopard version 5.2.9-7 for Leopard/ADDT development.
    After you get php installed you need to install MySQL which is easy to find through searching and straight-forward to instal. Then instal phpMyAdmin and you'll be good to go!
    As mentioned earlier I can walk you through the steps more thoroughly if you decide to upgrade to Leopard. There's some other steps involved: You need to configure virtual hosts so that it points to your Sites folder on your Mac and each folder in Sites folder are for each site you have so that entering site1 goes to ~/Sites/site1 on local testing server and entering site2 goes to ~/Sites/site2 in local testing server, etc. very, very easy to setup. Just edit hidden hosts file in etc folder and username.config file in apache2 hidden folder.
    There's other tutorials out there that show how to do it but most don't have all the info. I'm working on a step-by-step tutorial on my website but it's not finished yet. Maybe it'll be ready by the time you decide to upgrade to Leopard.

  • Tried to load wordpress but got error message that it was not running php, can it, and if so, how

    Tried to download "WordPress" thru Firefox, but got an error message that my Firefox was not running php. Can Firefox run php, and if so, what do I do to make it happen?

    its loading fine on my system and i don't have any special Add-on or Plugin installed specifically for it :-P
    However see this post:
    https://support.mozilla.com/en-US/questions/782622
    Check and tell if its working.

  • How do i solve - cannot access web server - error message when creating a project in 4.5 with PHP

    How do i solve - cannot access web server - error message when creating a project in 4.5 with PHP

    Screenshot of how it looks when i try to show a ms access form inside a iframe:
    http://oi58.tinypic.com/2vj4ish.jpg

  • I get the error message: Warning: Your web server's PHP installation has these functions disabled: ftp_connect, ftp_login, ftp_nb_fput. Your hosting company mus

    I have tried re-setting firefox. I had downloaded a plug in to back up my WordPress blog and received this error message when I tried to use this plug in to back up my files.

    I think this might be a server-side issue. Do you see the same message in other browsers such as internet explorer?
    If the problem is uploading a WordPress plugin to your blog, try installing it from the administrative panel instead. This article describes what I mean:
    http://codex.wordpress.org/Managing_Plugins#Installing_Plugins

  • When trying to udate iTunes on my PC, I recieve the error message "The older version of iTunes cannot be removed"  How do I correct this error and not lose all the music I have in iTunes?

    When trying to update my version of iTunes on my PC with Windows 7,  I receive the error message "The older version of iTunes cannot be romoved".  How do I correct this problem without losing all the music that I have in iTunes on my PC?

    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • I keep getting an error message when trying to log on to FaceTime and iMessage on my iPad mini with wifi...could not sign in. Please check your network connection and try again. Help!

    I keep getting an error message when trying to log on to FaceTime and iMessage on my iPad mini with wifi...Could not sign in. Please check your network connection and try again. Help!

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
     Cheers, Tom

Maybe you are looking for

  • Trouble hooking up to i tunes

    When I turn my ipod on it shows the usb cable. When I plug my ipod touch into my computer itunes comes up and it says it can't access my ipod because it is locked with a password, to unlock it. I can't unlock it cause it won't leave the screen that h

  • New strructure

    Hi Experts, I am archiving customer contacts using the archiving object ISU_BCONT. I am getting an error message as " The structure BPC_CRM_GUID  is not contained in the definition of Archiving object   ISU_BCONT. Add it ". How do I add this structur

  • Form fields remain interactive after form is saved

    I have built a number of forms by importing static pdf's in to Live Cycle and applying the form fields and scripts there. Now I am finding that if I save the form and then go to Acrobat XI to enable the form so that Adobe Reader users can fill it out

  • Incorrect *.pdf printing

    Hi. a coworker have some printing problems. When he wants to print a doc,  sometimes alls characters are the next one. (sorry for my english, i am french) i mean, when the text is "hello my name is john" or "hello my name is jake" the result is "ifmm

  • Photosmart 8230. How do you Remove the print heads for cleaning?

    Hi guys, I have a Photosmart 8230. After a few lines of printing the black ink fades to almost nothing, all the colours are perfect. There are no error messages. I have done the self cleaning and alignment procedures and wasted a lot of expensive ink