because we are on the internet.

Hello,recently,I am learning fireworks to make different kinds of image,above is one image made by myself,please put your comments,and if you have any other ways to make nice looking images,please feel free to share your information here.use fireworks to make different kinds of images.

If possible I will post the way to reach image like above in my next post.

 Foreach (array_expression as $value){

statement;

}

Foreach (array_expression as $key => $value){

statement;

}

for example

<?php

$arr = array(2,3,4,5) ;

foreach($arr as &$value){

$value = $value * 2;

}

//$arr now is array(4,6,8,10)

unset($value);//break the reference with the last element

//warning Reference of a $value and the last array element remain even after the foreach loop.It is recommended to destroy it by unset().

?>

<?php

$arr = array(”apply “,”orange”,”banana”);

reset($arr); //Set the internal pointer of an array to its first element

foreach($arr as $key => $value){

echo “Key:$key;Value:$value<br />\n”;

}

?>

In case you have lots of articles need to be show within the homepage,however,if we show all the links within homepage,that will make the homepage really ugly,how can we keep the links while make our site good looking.

We can use this script as follows:

<script language=JavaScript>

<! –

function MAP(s)

{var d = s.options[s.selectedIndex].value;

open(d,”open”);

s.selectedIndex=0 ;

}

//–>

</script>

<form name=milHomeLink>

<select onchange=”MAP(this);” size=”1″ selze=”1″ name=”select2″>

<option>Please choose your article</option>

<option value=”http://www.yoururlone.com”>yourtitleone</option>

<option value=”http://www.yoururltwo.com”>yourtitletwo</option>

<option value=”http://www.yoururlonethree.com”>yourtitlethree</option>

<option value=”http://www.yoururlonefour.com”>yourtitlefour</option>

<option value=”http://www.yoururlonefive.com”>yourtitlefive</option>

</select>

</form>
Quite easy right,in fact,it is very useful.

Hope this can help you to get save space for you pages.

email() function in php

Hello guys,the email() function in php could be very useful to send emails.If we could use php to create email address and then we can use email() function to send mails to others.

Okay,here I just write some code,if you needed,you can use them.

You can create a file let’s say email.php and save all the code within the file.

<?php header(”Content-Type:text/html;charset=utf-8″); ?>
<?php
$s = 1000;////////////////$s stand for how many emails you want to create,I set it as 1000.

for($i = 1;$i <= $s;$i++){
$qqemail9 = rand(1,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . “@qq.com”;
$qqemail8 = rand(1,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . rand(0,9) . “@qq.com”;
$num = rand(1,2);
if($num = 1){
$to = “{$qqemail9}”;
$subject = “this is the subject”; //////////////////sent “this is the subject” with your subject.
$message = “this is the content” . ” \r\n “; //////////////////sent “this is the content” with your content.

echo $i . ” ” . $to . “<br />”;
mail($to, $subject, $message, “FROM: sender@sender.com”);////////sender@sender.com is your own address,you can change it to your own email address.
}elseif($num =2){
$to = “{$qqemail8}”;
$subject = “this is the subject”; //////////////////sent “this is the subject” with your subject.
$message = “this is the content” . ” \r\n “;//////////////////sent “this is the content” with your content.
echo $i . $to . “<br />”;
mail($to, $subject, $message, “FROM: sender@sender.com”);////////sender@sender.com is your own address,you can change it to your own email address.
}
}

echo “You have sent” . $s . “emails”;
?>

Just upload the email file to your hosting and open the file you will have 1000 emails sent.

get sign by birthday in php

Hello,I wrote some code for getting sign by birthday.

You need to create two file.

 One is the file with the the code below and name it as sign_form.php

<form action=”get_sign.php” value=”">

year:<input name=”year” valut=”" type=”text” /> <br />

month:<input name=”month” valut=”" type=”text” /> <br />

day:<input name=”day” valut=”" type=”text” /> <br />

submit:<input submit=”submit” valut=”submit” type=”submit” /> <br />

</form>

then have another file with the code as below and save it as get_sign.php

         if((date(m) > $_POST[’month’]) || (date(m) == $_POST[’month’] && $_POST[’day’] <= date(d))){
         $age = date(Y) - $_POST[’year’] + 1;
         }else{
         $age = date(Y) - $_POST[’year’];
         }
         if(($_POST[’month’] == 1 && $_POST[’day’] >= 21) OR ($_POST[’month’] == 2 && 19 >= $_POST[’day’])){
            $sign = “Aquarius”;
         } elseif(($_POST[’month’] == 2 && 20 <= $_POST[’day’]) OR ($_POST[’month’] == 3 && $_POST[’day’] <= 20)){
            $sign = “Pisces”;
         } elseif(($_POST[’month’] == 3 && 21 <= $_POST[’day’]) OR ($_POST[’month’] == 4 && $_POST[’day’] <= 20)){
            $sign = “Aries”;
         } elseif(($_POST[’month’] == 4 && 21 <= $_POST[’day’]) OR ($_POST[’month’] == 5 && $_POST[’day’] <= 20)){
            $sign = “Taurus”;
         } elseif(($_POST[’month’] == 5 && 21 <= $_POST[’day’]) OR ($_POST[’month’] == 6 && $_POST[’day’] <= 21)){
            $sign = “Gemini”;
         } elseif(($_POST[’month’] == 6 && 22 <= $_POST[’day’]) OR ($_POST[’month’] == 7 && $_POST[’day’] <= 22)){
            $sign = “Cancer”;
         } elseif(($_POST[’month’] == 7 && 23 <= $_POST[’day’]) OR ($_POST[’month’] == 8 && $_POST[’day’] <= 22)){
            $sign = “Leo”;
         } elseif(($_POST[’month’] == 8 && 23 <= $_POST[’day’]) OR ($_POST[’month’] == 9 && $_POST[’day’] <= 22)){
            $sign = “Virgo”;
         } elseif(($_POST[’month’] == 9 && 23 <= $_POST[’day’]) OR ($_POST[’month’] == 10 && $_POST[’day’] <= 23)){
            $sign = “Libra”;
         } elseif(($_POST[’month’] == 10 && 24 <= $_POST[’day’]) OR ($_POST[’month’] == 11 && $_POST[’day’] <= 22)){
            $sign = “Scorpio”;
         } elseif(($_POST[’month’] == 11 && 23 <= $_POST[’day’]) OR ($_POST[’month’] == 12 && $_POST[’day’] <= 21)){
            $sign = “Sagittarius”;
         } elseif(($_POST[’month’] == 12 && 22 <= $_POST[’day’]) OR ($_POST[’month’] == 1 && $_POST[’day’] <= 20)){
            $sign = “Capricorn”;
         }
         echo $sign;

 Then we just visit the sign_form.php and input the birthday and click submit,we will get the sign according the birthday.

 

About Author

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vestibulum at arcu. Integer et risus. Morbi id tellus. Integer felis. Mauris malesuada, turpis vitae facilisis euismod, dui arcu adipiscing sem, eu vulputate leo ante in lacus. Sed porta accumsan lectus. Aenean ac sem. In consequat tempus velit. Phasellus leo enim, adipiscing a, egestas nec, pretium ut, pede. Mauris sollicitudin diam et mauris. Sed quis enim vel augue egestas lobortis. Etiam tempus ipsum vel neque.