Why a Business needs a web site design?y yo
A professionally designed website has become one of the most important business marketing tools available. Its a billboard available 24/7, showing potential clients your products, services, contact details, and much more.
See Sample Design work
http://www.rathnasoftnet.com
http://www.rathnasoft.in
ur Business needs a web site?
PHP and Ajax for Login forms
Design a login box like the one shown below
<form method="post" action="#" name="login" id="login">
<label>Login Id:
<input type="text" name="uid" id="uid" tabindex="1" class="text"/>
</label>
<label>Password:
<input type="password" name="pwd" id="pwd" tabindex="2" class="text"/>
<img src="images/login.jpg" alt="Login" name="submit" width="76" height="16" id="submit" onclick="submfrm()" style="cursor:pointer;" />
</label>
</form>
<form method="post" action="#" name="login" id="login">
<label>Login Id:
<input type="text" name="uid" id="uid" tabindex="1" class="text"/>
</label>
<label>Password:
<input type="password" name="pwd" id="pwd" tabindex="2" class="text"/>
<img src="images/login.jpg" alt="Login" name="submit" width="76" height="16" id="submit" onclick="submfrm()" style="cursor:pointer;" />
</label>
</form>
![]() |
Write the submfrm() function <script language="javascript" type="text/javascript">
function submfrm()
{
var exp1="^[\\w-.]+\\@[\\w.-]+\\.[a-z]{2,4}$";
var exp2="^[0-9a-zA-Z_]*$";
if(document.getElementById("uid").value.match(exp1) && document.getElementById("pwd").value.match(exp2))
{
var obj=document.getElementById("uid");
var str = obj.name + "=" + obj.value;
obj=document.getElementById("pwd");
str += "&" + obj.name + "=" + obj.value;
$.ajax({
type: "POST",
url: "checklog.php",
data: str,
success: function(msg){
if(msg=="0")
window.location="pagename.php";
else
alert("Inavlid Login Name / Password");
}
});
}
else
alert("Inavlid Login Name / Password");
}
</script>
Note: Take care to include the jquery.js file for the Ajax to run successfully
MySQL Programming Help
MySql Datatype TIME
The datatype TIME stores values in the format of 00:00:00 for eg: 10:23:54Task: Retrieve the data with only hours and minutes
select date_format(newstime,'%H:%i') from india_news where news_flg=1
%H,%i is what you need to add.
PHP Programming Help
Task: Print the last value of a csv file. say it contains a 2078 rows of records.
When you open a csv file and explode it, it stores the file in arrays.Code Snippet:
PHP AND CSV FILES
php version 5.1.4
<?PHP
$file_handle = fopen("mycsv.csv", "r");
$count =0; //count is initialized to 0
while (!feof($file_handle) ) {
$line_of_text = fgetcsv($file_handle, 1024); //READS THE CSV FILE LINE BY LINE
$buffer = fgets($file_handle);$myar=explode(",",$buffer); //VALUES ARE STORED IN ARRAYS
array_pop($myar); // removes the last element of an array
$count++; //count is incremented so that we can find the row number / loop number }
$newcount = $count;
fclose($file_handle);
$new = $newcount;
$new = $new - 1;
$file_handle = fopen("mycsv.csv", "r");
$count =0;
while (!feof($file_handle) ) {
$line_of_text = fgetcsv($file_handle, 1024); //READS THE CSV FILE LINE BY LINE
$buffer = fgets($file_handle);
$myar=explode(",",$buffer);
$count++; // COUNTS THE NUMBER OF TIMES / ARRAY OF ARRAYS
array_pop($myar);
$result = end($myar);
switch ($count) // When the count number equals the required array row you get the result
{
case $new:
echo $result;
break;
}
}
fclose($file_handle);
?>
Cloud Computing:
Know what is cloud computing? - it is a key development area for web developers to build web applications.
You can edit an image online using a software similar to Photoshop, do,edit coding in PHP, ASP, CGI, Perl, Python, HTML without installing the required softwares / editors.
Follow this link to know more:
http://www.hotscripts.com/blog/cloudbased-services-web-developers/
Mobile Version of Website:
With the proliferation of mobile devices developing a website to suit mobile devices is becoming necessary and logically essential.
jQuery:
Showcasing your photos / images in a vertical or horizontal way with a simple zoom effect is not the recent trend but showcasing it with jQuery has an eye-catching effect.