Monday, 29 December 2014

Tagged under:

Send Email in php Code With Form

Useing the PHP MAIL function to send form data to email and website PHP contact form script send to your email Address.



Copy and paste this code and save it as send.php

Use of  This Examples :

<?php
if(isset($_POST['butsend']))
$to="youremailid@gmil.com";/*Your Email*/
$subject="Message from Our Counsellors";

$date=date("l, F jS, Y");
$time=date("h:i A");

$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$mobile = $_REQUEST['mobile'];
$city  =$_REQUEST['city'];
$course =$_REQUEST['course'];


$msg="
Message sent from Our Counsellors Form on date  $date, hour: $time.\n
Name    : $name
Email ID    : $email
Mobile No.    : $mobile
City                   : $city
Course                 : $course

";

mail($to,$subject,$msg,"From:".$Email);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="5;url=http://www.mysite.com">
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center"><h4 style="font:bold 24px Arial, Helvetica, sans-serif; color:#FFF; background:#333;">Thank You...We Will Reply You Shortly...</h4></td>
  </tr>
</table>
</body>
</html>

Saturday, 27 December 2014

Tagged under:

Processing the Form Send Data (Php Code)

we are going to create our PHP file that will process the data.

When you submit your HTML form PHP automatically populates two superglobal arrays, $_GET and $_POST, with all the values sent as GET or POST data, respectively.

Therefore, a form input called 'Name' that was sent via POST, would be stored as $_POST['Name'].



Copy and paste this code and save it as send.php

<?php
//Check whether the form has been submitted
if (array_key_exists('check_submit', $_POST)) {
   //Converts the new line characters (\n) in the text area into HTML line breaks (the <br /> tag)

   $_POST['Comments'] = nl2br($_POST['Comments']);
   //Check whether a $_GET['Languages'] is set
   if ( isset($_POST['Colors']) ) {
     $_POST['Colors'] = implode(', ', $_POST['Colors']); //Converts an array into a single string
   }

   //Let's now print out the received values in the browser
   echo "Your name: {$_POST['Name']}<br />";
   echo "Your password: {$_POST['Password']}<br />";
   echo "Your favourite season: {$_POST['Seasons']}<br /><br />";
   echo "Your comments:<br />{$_POST['Comments']}<br /><br />";
   echo "You are from: {$_POST['Country']}<br />";
   echo "Colors you chose: {$_POST['Colors']}<br />";
} else {
    echo "You can't see this page without submitting the form.";
}
?>

GET and POST
When defining the technique to send information to the PHP script, you either use GET or POST. Both send variables across to a script, however they achieve this in various ways.

The GET method has a control on the amount of information than could be sent. Consequently, if you send long variables using GET, you will likely lose large amounts of them.

The POST method sends its variables behind the scenes and has no limits on the amount of information to be sent. Because the variables aren't displayed in the URL, it is extremely hard to bookmark the page.
Use of  This Examples :
See below for what I roughly use... some things are changed though, like I've a good little goto() function, in place of writing out the address twice in a header/exit call.

Copy and paste this code :
##################################
<?php
//--------------------------------------------------
// Return the required values for this script

$act = isset($_POST['act'] ? $_POST['act'] : '');
$name = isset($_POST['name'] ? $_POST['name'] : '');

//--------------------------------------------------
// By default there are no errors

$htmlErrors = array();

//--------------------------------------------------
// If the user has submitted the form

if ($act != '') {

//--------------------------------------------------
// Validation

if (trim($name) == '') {
$htmlErrors['name'] = 'Your name is required';
}

if (strlen($name) > 100) {
$htmlErrors['name'] = 'Your name cannot be longer than 100 characters';
}

//--------------------------------------------------
// If the data is valid

if (count($htmlErrors) == 0) {

//--------------------------------------------------
// Do something...

//--------------------------------------------------
// Send the user onto the thank-you page

header('Location: ./thankyou/');
exit('<p>Goto <a href="./thankyou/">next page</a></p>');

}
}
?>

<form action="./" method="post" class="basicForm">
<fieldset>
<legend>Form</legend>

<?php
if (count($htmlErrors) > 0) {
echo '<ul class="error">';
foreach ($htmlErrors as $err) echo '<li>' . $err . '</li>';
echo '</ul>';
}
?>

<div class="row<?= (isset($htmlErrors['name']) ? ' error' : '') ?>">
<span class="label"><label for="fldName">Name:</label></span>
<span class="input"><input type="text" name="name" id="fldName" value="<?= htmlentities($name) ?>" /></span>
</div>

<div class="row submit">
<input type="hidden" name="act" value="submit" />
<input type="submit" value="Send" />
</div>

</fieldset>
</form>

Passing Dynamically Selected Value from a database through an HTML Form in PHP 5?
HTML form and use PHP code to create decisions based off this information to create dynamic webpages
<?$rb = $_GET['rb']; // value of rb got from previous form
connectToDB();
$sql="select * from category where cat='$rb' and visible='TRUE' order by cat_name";
$res=mysql_query($sql);
$submit = $_POST['submit'];
?>

<form method = "POST" value = "prod2.php">
<table cellSpacing="0" cellPadding="3" width="70%" align="center" border="1" bordercolor="#cccccc" id="table5">
<tr bgColor="#cccccc">
<td align="middle" colspan="2">
<font face="Verdana, Tahoma, Arial" size="2"><b>
<font color="#cc0033">Choose Category </font></b></font>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<?php
while($arow=mysql_fetch_array($res))
{
?>
<tr>
<td><b><font color="#cc0000" face="Verdana, Tahoma, Arial" size="2">&nbsp;<?php print $arow[cat_name]; ?></font></b></td>
<td><font face="Arial" size="2">
<input type="radio" value="<?php print $arow[cat_id]; ?>" name="sel_catid[]" checked><? print $arow[cat_id];?></font></td>
</tr>
<?
} // cat name
?>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" name="submit" value="Submit" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt">
</td>
</tr>
</table>
</form>

Friday, 26 December 2014

Tagged under:

User Interface Design Tips, Techniques, and Principles

Use of the Web Application Interface Techniques, the first part of our report on useful design trends in modern Web applications. Among other activities, we highlighted embedded video blocks, specialized controls and context-sensitive navigation.

We also encouraged designers to disable pressed buttons, use shadows around modal windows and link to the sign-up page from the log-in page.

"A dialed-in creative navigation concept should be central to the UI design.


Users want direction and flow, delivered intuitively in place of trying to figure it out for themselves,"

With that said, the capability to surprise a consumer can easily be area of the experience and can pay off in user retention."

Great UI design is the important thing to success - but achieving in practice isn't easy. Follow our expert tips to help you on your own way.


In this topics share :

Tagged under:

Techniques to User Interfaces Design

Let's focus on the fundamentals of interface design. Constantine and Lockwood describe an accumulation of principles for improving the caliber of your interface design. These principles are.

  • Design with one end goal at heart
  • Keep everything as simple as you are able to
  • Design for average users, not ideal ones
  • Think when it comes to flow, focus, and direction
  • Use high quality, professional design software
  • Sketch your ideas prior to starting designing
  • Use other user interfaces as inspiration
  • Developing an application? Use keyboard shortcuts
  • Designing for the web? Make sure it's responsive
  • Use color to signify status, value, or importance
  • Test your interface prior to starting using it

Thursday, 18 December 2014

Tagged under:

Get a Travel Information

India's leading tour & Travel Company offering holiday tours, honeymoon travel packages, sightseeing tours and transfers, hotels, cruises, flights and other travel related services..

Travel Web site
  • International and Domestic Air Tickets, Holiday Packages and Hotels 
  • Domestic Bus and Rail Tickets 
  • Private Car and Taxi Rentals 
  • B2B and Affiliate Services