Jump to content

Bala

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Bala's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. can any one help me with examples for Deleting multiple rows from mysql with checkbox
  2. <?php /* this is guarunteed to work it is possible to use <? (short tags but this style works everywhere).*/ /*Only verify/validate form when it is submitted program name: form.php */ if(isset($_POST[submit])){ $error='';//initialize $error to blank if(trim($_POST[username])=='' || strlen(trim($_POST[username])) < 6 ||strlen(trim($_POST[username])) >12){ $error.="Please enter a username between 6 and 12 characters!<br />"; //concatenate the $error Message with a line break } if(trim($_POST[password])=='' || strlen(trim($_POST[password]))< 6){ $error.="Your password must be at least 6 characters in length!<br />";//concatenate more to $error } if(trim($_POST)==''){ $error.="An email address is required!<br />"; } else { if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $_POST)) { $error="The e-mail you entered was not in the proper format!"; } } if($error==''){//Hmmmm no text is in $error so do something else, the page has verified and the email was valid // so uncomment the line below to send the user to your own success page or wherever (swap yourpage.php with your files location). //echo "script type=\"text/javascript\">window.location=\yourpage.php\"<script>"; } else{ echo "<span style=color:red>$error</span>"; } } ?>
  3. can any one guide me to validate user in registration and display error at right hand side in red color for example "user name should contain 7 letter" when clicked submit button
  4. The following are the program how can i give pass variable to href <?php // search.php $dd=$_POST[days]; $dd = str_pad($dd, 2, '0', 1); // If it is less than 2 characters long, add a 0 on the left side $mm=$_POST[month]; $mm = str_pad($mm, 2, '0', 1); // If it is less than 2 characters long, add a 0 on the left side $yy=$_POST[year]; $j=$dd . "-" . $mm . "-" . $yy . ".html"; echo "<a href=<?$def_dir/$j?>clickhere</a>"; $month = strtolower(date('M', strtotime("$yy$mm$dd 12:00:00"))); // A lot going on here // strtolower makes the results all lowercase to match your 'mar' for march // date('M', ...) returns the 3-letter form of month // strtotime() is returning the unix timestamp for date() for the submitted date, at 12 noon. $def_dir="/var/www/html/backup/$month"; ?>
  5. hi ucffool Thanks for your reply man its really helping me out instead of writing for loops in php ive used html for date ,month and year option its really helping me out here very much thanks to you Regards Balasubramanian.N
  6. hi ucffool Thanks for your reply man its really helping me out instead of writing for loops in php ive used html for date ,month and year option its really helping me out here very much thanks to you Regards Balasubramanian.N
  7. hi all iam new beginner to php just 20 days old iam basically a unix admin. As my role depend on report generation and performance analysis i had written a unix shell script which convert in to html and saves in particular directory sample /var/www/html/backup/mar/29-03-2008.html like above the consalidated output for all days are manintained now i used a html form/post method to get input like date month and year all are sepeate drop down menu the script is given below <html><title><head></head></title> <body> <form action="search.php" method="POST"> PLEASE ENTER THE DATE MONTH AND YEAR <select name="days"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> </select> <select name="month"> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> </select> <select name="year"> <option>2008</option> <option>2009</option> </select> <input type=submit name=search value=search> </form> </body> </html> and php script is as below <?php $dd=$_POST[days]; $mm=$_POST[month]; $yy=$_POST[year]; $j=$dd."-".$mm."-".$yy.".".html; echo $j; $def_dir="/var/www/html/backup/$mm"; chdir ($def_dir); print_r(glob($j)); ?> if a person search for particular day the script should display the report of that particular day plz i need a help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.