User Profile

Collapse

Profile Sidebar

Collapse
dumm
dumm
Last Activity: Jan 5 '09, 07:11 PM
Joined: Dec 14 '08
Location: Montreal, Qc, Canada
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dumm
    replied to i have a problem with my search page
    in PHP
    Should be:

    Code:
    <?php
     
        $link = mysql_connect( "localhost", "user2", "point" );
        if ( ! $link )
        die( "Couldn't connect to MySQL" );
        mysql_select_db( "files", $link )
        or die ( "Couldn't open $database: ".mysql_error() );
     
        if (isset($_POST["term"])){
        $term = $_POST["term"];
    ...
    See more | Go to post

    Leave a comment:


  • dumm
    replied to mod rewrite help needed
    in PHP
    Code:
    RewriteRule ^.*([a-zA-Z\-]+)([0-9]+).html$ description.php?section=$1&id=$2
    Where "section" become your dynamic word.
    See more | Go to post

    Leave a comment:


  • When you have a mysql error, you can output the error by echoing mysql_error() after the query has been sent.

    example:
    Code:
    $sql = mysql_query("SELECT * FROM user WHERE Fname LIKE '%term%'");
    if(!$sql)
    echo mysql_error();
    In your query you must put %term% between quotes.

    Code:
    $sql = mysql_query("SELECT * FROM user WHERE Fname LIKE '%term%' ");
    See more | Go to post

    Leave a comment:


  • dumm
    replied to page refreshproblem
    in PHP
    A way to do this, is to set a session once the form has been process.

    Example:

    Code:
    <?php
    
    session_start();
    
    if(!empty($_POST) && !$_SESSION["FORMSUBMITTED"]){ // process the form data only if the session return false
    
    // process your form here
    
    $_SESSION["FORMSUBMITTED"] = true; // set the session to true that the form don't get process again
    ...
    See more | Go to post

    Leave a comment:


  • dumm
    replied to Help with mail code
    in PHP
    Code:
    $email = $_POST['email'];
     mail("$email", "$Report_Date Action Items", 
     $Current_Shift_Report, $headers);
      
      
     if(!mail)
     {
     echo "Your submission failed, please try again later";
     }


    Try:


    Code:
    $email = $_POST['email'];
     $sendmail = mail("$email", "$Report_Date Action Items",
    ...
    See more | Go to post

    Leave a comment:


  • dumm
    replied to Help with mail code
    in PHP
    Your code to send the email is in your while loop.
    So while you are fetching the data from your mysql query, you are sending an email every time you fetch a row.
    See more | Go to post

    Leave a comment:


  • dumm
    replied to Include PHP Code in XML document
    in PHP
    You need to put the xml code into the php file. By sending the xml header to the browser, you tell the browser to render it as an XML document.

    To send the XML header to the browser just put this at the top of your php file before any other output :

    header("Content-type:text/xml; charset=utf-8");

    You CAN'T put php inside XML document BUT you can put xml inside a php document

    Hope it...
    See more | Go to post

    Leave a comment:


  • If you get this type of output to the browser, try to put <?php instead of <?
    See more | Go to post

    Leave a comment:


  • dumm
    replied to Include PHP Code in XML document
    in PHP
    You must sent the xml header to the browser in your php file.

    Code:
    <?php 
    
    header("Content-type:text/xml; charset=utf-8");
    
    echo '<thumbnailer'>;
    
    
    /* PHP code to generate your data goes here */
    
    
    echo '</thumbnailer>';
    
    
    exit;
    ?>
    See more | Go to post

    Leave a comment:


  • dumm
    replied to Image Function Problem Function
    in PHP
    if(($_FILES['extra_img_1'] != "") || ($_FILES['extra_img_2'] != "") || ($_FILES['extra_img_3'] != "") || ($_FILES['extra_img_4'] != "") || ($_FILES['extra_img_5'] != ""))


    Should be :

    if(($_FILES['extra_img_1']["name"] != "") || ($_FILES['extra_img_2']["name"] != "") || ($_FILES['extra_img_3'] != "") || ($_FILES['extra_img_4']["name"]...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...