Home Page Google Free Quote | Contact Us

 
About IT Maverick software solutions developed by us portfolio of current website projects Frequently Answered Questions our website studio IT Maverick's blog of technical solutions download free code and applications contact us for a quote or more info
        

SEPTEMBER 02, 2010 03:10PM

Use JavaScript to process an HTML Form A

When you have an HTML form with an array like this:

< input name="myArray[]" type="text" size="20" maxlength="40" / >
< input name="myArray[]" type="text" size="20" maxlength="40" / >
< input name="myArray[]" type="text" size="20" maxlength="40" / >

The array must be copied to a variable first. Place this statement in your JavaScript

var var_myArray = document.myArray.elements["myArray[]"];

Once you have the array inside of a var it can be processed with a FOR loop like this.

for(i=0;i < var_myArray.length;i++)
{
alert(var_myArray[i].value);
}

0 comments | Comment |

AUGUST 12, 2010 04:20PM

PHP get today's date

// Assuming today is March 10th, 2001, 5:16:18 pm, and that we are in the
// Mountain Standard Time (MST) Time Zone

$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
$today = date("m.d.y"); // 03.10.01
$today = date("j, n, Y"); // 10, 3, 2001
$today = date("Ymd"); // 20010310
$today = date('h-i-s, j-m-y, it is w Day'); // 05-16-18, 10-03-01, 1631 1618 6 Satpm01
$today = date('\i\t \i\s \t\h\e jS \d\a\y.'); // it is the 10th day.
$today = date("D M j G:i:s T Y"); // Sat Mar 10 17:16:18 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:18 m is month
$today = date("H:i:s"); // 17:16:18

0 comments | Comment |

AUGUST 12, 2010 03:16PM

Using php to Count records returned from

$result = mysqli_query($conn, "SELECT Name FROM people"));

$row_cnt = mysqli_num_rows($result);

0 comments | Comment |

AUGUST 12, 2010 02:00PM

Reading from a database

$query = "SELECT name FROM club WHERE id='$club_num'";
$result= mysqli_query($Conni, $query) or die(mysqli_error($Conni));
$row = mysqli_fetch_array($result);
$club_name = $row['name'];

0 comments | Comment |

AUGUST 12, 2010 10:54AM

Replacing Characters in a string

str_replace ( mixed $search , mixed $replace , mixed $subject [, int &$count ] )

0 comments | Comment |

JULY 29, 2010 08:04AM

HTML anchor email

Simple:
<_a href= "mailto:abc@mail.com" >Email Example

with Subject and Body
<_a href= "mailto: a@b.com?subject=Web Page Email&body=This email is from your website" >2nd Email Example

0 comments | Comment |

© 2009 IT Maverick, LLC. All rights reserved