Jump to content

Nakor

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

Posts posted by Nakor

  1. <?php
    // Check email is not empty
    if (! empty ($_POST['Email']) )
    {
    
    // Getformdataandcreateemail
    $Email2="mail@mysite.co.uk";
    $email=$_POST['Email']; 
    $name=stripslashes($_POST['Name']);
    $subject=stripslashes($_POST['Subject']);
    $messagecont=stripslashes($_POST['Message']);
    $message=
    <<<EOD
    --------------------------------
    Enquiry from your website
    --------------------------------
    
    Name: $name
    Subject: $subject
    EmailAddress: $email
    Message: $messagecont
    
    --------------------------------
    End of Message
    --------------------------------
    EOD;
    
    //Sendemail
    @mail($Email2,$subject,$message, "From:$Email2");
    header("Location:thankyou.html");
    
    }
    else
    {
        // No email was sent
        header("Location:form.html");
    }
    
    ?>

  2. From what I understand of your question: You simply need to receive input from the user when they submit the flash form and then display the appropriate background flash image. In which case your example of $_POST['file_name'] should work. Although I don't believe you can actually use a flash image as a background for a webpage with the HTML you provided.

  3. <?php                         
    	$input = array(
    	array('filename' => 'home.html',
    		'title' => 'home page'),
    	array('filename' => 'products.html',
    		'title' => 'products'),
    	array('filename' => 'contact.html',
    		'title' => 'contact'),
    	array('filename' => 'prices.html',
    		'title' => 'prices'));
    
    //echo add_accesskeys($input);
    
    function add_accesskeys($arr) 
    {
    $output = '<ul>';
    
    foreach($arr as $key => $data)
    {
    		$output .= '<li><a href="'. $data['filename'] .'" accesskey="'. $data['title']{0} .'">'. $data['title'] .'</a></li>';	
    }
    $output .= '</ul>';
    
    return $output;
    
    }
    ?>

  4. <?php $conn = mysql_connect('removed','removed', 'removed'); mysql_select_db('removed',$conn); $delete = "TRUNCATE TABLE logins"; mysql_query($delete,$conn); ?>

    You need to include the start and end tags for PHP.

  5. Because you are just concatenating two variables.

     

    Your code:

    $test = 'default';
    $test1 = 'a';
    $test2 = 'b';
    $test3 = 'c';
    
    for($i = 1; $i <= 3; $i++)
    {
        echo $test . $i;
    }
    /*
    Output:
    default1
    default2
    default3
    */
    

     

    My code:

    $test = 'default';
    $test1 = 'a';
    $test2 = 'b';
    $test3 = 'c';
    
    for($i = 1; $i <= 3; $i++)
    {
        eval('echo $test'. $i .';');
    }
    /*
    Output:
    a
    b
    c
    */
    

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