Jump to content
Killersites Forums

fazlionline

Member
  • Posts

    204
  • Joined

  • Last visited

Posts posted by fazlionline

  1. Hi all,

    I want to check if the user is using Internet Explorer 7 or above,

    if it is version 7, he should have an Alert saying “You're using 7.x, please update your IE”

    and if he has version 8 so NO alert should appear.

    My code is bellow but I am getting alert for both versions.

    Need help

     

     

    <script type="text/javascript">
    if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
    var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
    if (ieversion>=8)
     alert("")
    else if (ieversion>=7)
     alert("You're using 7.x, please update your IE")
    }
    </script>
    

  2. Hi BeeDev

    I was confused with some steps in your code

     

    1- I have made a PHP file named "myUrlIncludeFile.php"

     

    And stored the following information there

     

    <?php
    $base = 'http://fazlionline.com/v1';
    ?>
    

     

    2 - Then I pasted the following code on very-top of each page

     

    <?php
    require_once('myUrlIncludeFile.php')
    ?>
    

     

    3 - then past the following code in each page in

    tag

     

    
    

     

     

    But it didn?t work.

     

     

    Note:

    i didnt changes the slashes becaues when i do that,

    the image disapear form design wiev, (Like broken link)

    and when online, the LINK also shows INCORRECT/broken

  3. I have added slash to images,

    It is just replaced from:

     

     

    To:

     

     

    So the main change was just a slash before

     

    src="img3/home.gif" and a href="/index.php"

     

    now, please see the main page and sub page

     

     

    Two images are not working

    And even click on web design button is giving page error

  4. Thanks both

     

    But adding slash with each image will WORK but what about links then.

    In home page my link was

     

    index.php and webdesign/web_design.php

     

    So what with links then

     

    When I am in ?v1/webdesign Folder, then

     

    index.php and webdesign/web_design.php

     

    Will also give error

     

    Is there any better solution

     

    Also for time being, I have just webdesign Folder, but later on, I want to add more folders like grapic_desing, domain_host, News, and more.

    So i have to make changes in each folder.

    In there any better solution

  5. I have created a menu in Adobe Fireworks CS3

    Exported that, and copied all files to my main directory.

    I have linked the menu with

     

    <?php @include ('slidemenu03_sub.htm'); ?>

     

    It works fine in main page, see the link:

     

     

    Then I have created a folder named webdesign and copied index.php and past in webdesign folder, renamed it as web_design.php

    I changed the include code as:

     

    <?php @include ('../slidemenu03_sub.htm'); ?>

     

    I have just added ../ in there.

     

    Now when I brow

     

    http://fazlionline.com/v1/webdesign/web_design.php

     

    All images are missing and menu is not visible.

    Can anyone help me what is wrong

  6. thanks alot.

    can i store the value returend by foreach in a variable?

     

    foeexample:

     

    if (isset($interest) && $interest != '') {foreach ($interest as $int){    $details .=  "$int - ";}}
    $SelectedInterests = $int ;

     

    becuse i want to add this varibale in $details :

     

    ...
    $details = "\n URL - Form: $url\n
               Subject: $subject\n
               Name: $name\n
               email: $email\n
               system: $system \n
               gender: $gender \n
               message: $message \n
               [b][color=red]Interest: $int \n[/color][/b]
               language: ";
    ...
    

     

     

    thanks

  7. Thanks, now I do not get error if all checkboxes are left blank.

     

    I have added second group, interests.

    It also works fine but I get languages and interests values all in one line in my email.

     

    I have changed the code to this:

    if (isset($language) && $language != '') {foreach ($language as $lang){ $details .= "$lang - " ;}}

    $para = "

    ";

    $para;

    if (isset($interest) && $interest != '') {foreach ($interest as $int){ $details .= "$int - ";}}

     

    But didn?t worked

     

    How I can get them to appear each group in each line.

     

    Like

    ...

    Languages: English - Pashto - Dari

    Interests: PHP - Java - CSS

    ...

     

     

     

    My HTML Code is:

     

    Languages:

     

    English

    Pashto

    Dari

     

     

     

    Interests:

     

    PHP

    Java

    CSS

     

     

    Thanks

  8. thanks i read PHP foreach and PHP array in TIZAG.com

    thanks alot.

     

    now, i have two qestions:

     

    1 - if a user do not click any of the optoin in langauges, i get error:

     

    Warning: Invalid argument supplied for foreach() in d:\Customers\user1092190\www\t6_e\contactus.php on line 21

     

    Mail sent! Yay PHP!

     

    2 - as i am working on Job Application Form, i need such more checkboxes group.

    for example, this one was for language, other may be for Interesets (Interest: PHP, JAVA, CSS), other may be for somthing else.

    so how i can make all together in my above PHP scrip?

     

    thanks

  9. yes, there was a problem in PHP code

    in line 62 and i have fixed it.

     

    PHP Code:

     

    <?php 
    $to = "[my real email]" ; 
    $subject = " Applied for Web Design "; ;
    $name = $_REQUEST['name'] ; 
    $city = $_REQUEST['city'] ; 
    $email = $_REQUEST['email'] ; 
    $gender = $_REQUEST['gender'] ;
    $mobile = $_REQUEST['mobile'] ;
    
    foreach($_POST['language'] as $value) {
    
    $check_msg = "$value\n";
    
    }
    
    $language=$check_msg;
    
    
    $gender = $_REQUEST['gender'] ;
    $url = "T6 - EGGI - Application for Job"; 
    
    $details = "\n URL - Form: $url\n
               Subject: $subject\n
               Name: $name\n
               City: $city\n
               From: $email \n
               Gender: $gender \n
               Mobile: $mobile \n
               Language: $language \n
    
           ";
    
    ini_set("sendmail_from", $email);
    
    // Obtain file upload vars
    $fileatt      = $_FILES['fileatt']['tmp_name'];
    $fileatt_type = $_FILES['fileatt']['type'];
    $fileatt_name = $_FILES['fileatt']['name'];
    
    $headers = "From: $email";
    
    if (is_uploaded_file($fileatt)) {
     // Read the file to be attached ('rb' = read binary)
     $file = fopen($fileatt,'rb');
     $data = fread($file,filesize($fileatt));
     fclose($file);
    
     // Generate a boundary string
     $semi_rand = md5(time());
     $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
    
     // Add the headers for a file attachment
     $headers .= "\nMIME-Version: 1.0\n" .
                 "Content-Type: multipart/mixed;\n" .
                 " boundary=\"{$mime_boundary}\"";
    
     // Add a multipart boundary above the plain message
     $message = "This is a multi-part message in MIME format.\n\n" .
                "--{$mime_boundary}\n" .
                "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
                "Content-Transfer-Encoding: 7bit\n\n" .
                $details . "\n\n";
    
     // Base64 encode the file data
     $data = chunk_split(base64_encode($data));
    
     // Add file attachment to the message
     $message .= "--{$mime_boundary}\n" .
                 "Content-Type: {$fileatt_type};\n" .
                 " name=\"{$fileatt_name}\"\n" .
                 //"Content-Disposition: attachment;\n" .
                 //" filename=\"{$fileatt_name}\"\n" .
                 "Content-Transfer-Encoding: base64\n\n" .
                 $data . "\n\n" .
                 "--{$mime_boundary}--\n";
    }
    
    // Send the message
    $ok = mail($to, $subject, $message, $headers);
    if ($ok) {
     echo "
    Mail sent! Yay PHP!";
    } else {
     echo "
    Mail could not be sent. Sorry!";
    }
    ?>

  10. before removing "@", my error was:

    Mail could not be sent. Sorry!

     

     

    after removing "@", my error is:

    Warning: mail() [function.mail]: SMTP server response: 503 This mail server requires authentication when attempting to send to a non-local e-mail address. Please check your mail client settings or contact your administrator to verify that the domain or address is defined for this server. in E:\inetpub\vhosts\fazlionline.com\httpdocs\t4\mail.php on line 57

     

    Mail could not be sent. Sorry!


  11. <?php
    // Read POST request params into global vars
    $to = $_POST['to'];
    $from = $_POST['from'];
    $subject = $_POST['subject'];
    $message = $_POST['message'];

    // Obtain file upload vars
    $fileatt = $_FILES['fileatt']['tmp_name'];
    $fileatt_type = $_FILES['fileatt']['type'];
    $fileatt_name = $_FILES['fileatt']['name'];

    $headers = "From: $from";

    if (is_uploaded_file($fileatt)) {
    // Read the file to be attached ('rb' = read binary)
    $file = fopen($fileatt,'rb');
    $data = fread($file,filesize($fileatt));
    fclose($file);

    // Generate a boundary string
    $semi_rand = md5(time());
    $mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";

    // Add the headers for a file attachment
    $headers .= "\nMIME-Version: 1.0\n" .
    "Content-Type: multipart/mixed;\n" .
    " boundary=\"{$mime_boundary}\"";

    // Add a multipart boundary above the plain message
    $message = "This is a multi-part message in MIME format.\n\n" .
    "--{$mime_boundary}\n" .
    "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
    "Content-Transfer-Encoding: 7bit\n\n" .
    $message . "\n\n";

    // Base64 encode the file data
    $data = chunk_split(base64_encode($data));

    // Add file attachment to the message
    $message .= "--{$mime_boundary}\n" .
    "Content-Type: {$fileatt_type};\n" .
    " name=\"{$fileatt_name}\"\n" .
    //"Content-Disposition: attachment;\n" .
    //" filename=\"{$fileatt_name}\"\n" .
    "Content-Transfer-Encoding: base64\n\n" .
    $data . "\n\n" .
    "--{$mime_boundary}--\n";
    }

    // Send the message
    $ok = @mail($to, $subject, $message, $headers);
    if ($ok) {
    echo "

    Mail sent! Yay PHP!

    ";
    } else {
    echo "

    Mail could not be sent. Sorry!

    ";
    }
    ?>
  12. I have I contact us form to send data to my email.

    All fields works fine but I get the Gender value NOTHING.

    Can anyone tell me what is wrong in my scrip?

     

    <?php 
    $to = "[my real email]"; 
    $subject = $_REQUEST['subj'] ;
    $name = $_REQUEST['name'] ; 
    $city = $_REQUEST['city'] ; 
    $email = $_REQUEST['email'] ; 
    $message = $_REQUEST['message'] ;
    $gender = $_REQUEST['gender'] ;
    $url = "T1 - fazlionline - Contact Form"; 
    
    $details = "\n URL - Form: $url\n
               Subject: $subject\n
               Name: $name\n
               City: $city\n
               From: $email \n
               Gender: $gender \n
               Message: $message \n
           ";
    
    
    
    ini_set("sendmail_from", $email);
    $headers = $email; 
    $sent = mail($to, $subject, $details, $headers, $message) ; 
    if($sent) 
    {print "Your mail was sent successfully"; }
    else 
    {print "We encountered an error sending your mail"; }
    ?> 

  13. WOW

    I have found in DreamWeaver CS3

    Here is how to do it:

     

    In the Document window, place the insertion point where you want the date to be inserted.

    Do one of the following:

    Select Insert > Date.

     

    In the Common category of the Insert bar, click the Date button.

     

    In the resulting dialog box, select a format for the name of the day of the week, a format for the date, and a format for the time.

    If you want the inserted date to be updated every time you save the document, select Update Automatically On Save. If you want the date to become plain text when it?s inserted, and never update automatically, deselect that option.

    Click OK to insert the date.

     

     

    See Adobe Center For more inforamtion: http://livedocs.adobe.com/en_US/Dreamweaver/9.0/help.html?content=WSc78c5058ca073340dcda9110b1f693f21-7ccd.html

×
×
  • Create New...