3/31/2011 08:25:01 am

Welcome Programmers, Developer, Beginners

Post your Experiences, Queries and let other know more about the technology.

Thanks
Rafee

Reply
Rafee
8/10/2011 05:24:46 pm

the code here for Calculator.


<form name="name1" method="post">
<input type="text" name="num1">
<!-- code to change the operator symbol ->
<label for="plus">
<?php
if(isset($_POST['add'])){echo "+";}
elseif(isset($_POST['sub'])){echo "-";}
elseif(isset($_POST['mul'])){echo "*";}
elseif(isset($_POST['div'])){echo "/";}
?>
</label>
<input type="text" name="num2"> =
<!-- code to display answer ->
<label for="result"><?php
$somevar1 = $_POST["num1"];
$somevar2 = $_POST["num2"];
if(isset($_POST['add'])){$result = $somevar1 + $somevar2;}
elseif(isset($_POST['sub'])){$result = $somevar1 - $somevar2;}
elseif(isset($_POST['mul'])){$result = $somevar1 * $somevar2;}
elseif(isset($_POST['div']))
{if($somevar2>0){$result = $somevar1 / $somevar2;
}else{echo "Undefine";}
}
echo $result;
?></label>
<br><br>
<input type="submit" value="+" name="add">
<input type="submit" value="-" name="sub">
<input type="submit" value="*" name="mul">
<input type="submit" value="/" name="div">
</form>

Reply
Rafee
9/2/2011 08:07:48 pm

Send Email form PHP, xampp.

first you need to configure
php.ini and sendmail.ini configuration files in xampp folder.

you can check out in below link where i have posted out the complete answer for how to send email form php.


http://stackoverflow.com/questions/7213113/php-email-not-working-error/7239994#7239994

Reply
Rafee
10/3/2011 07:30:46 pm

<h1>Access Xampp from Lan Network Computer</h1>

Open this file

-----------------------------------
D:\xampp\apache\conf\extra\httpd-xampp.conf
-----------------------------------
and search for

----------------------------------
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
Allow from otheripaddress
Allow from otheripaddress
----------------------------------


And restart the Apapche services.

Reply



Leave a Reply.