Jump to content

only allowing numbers and : and . to be enerd into db


runnerjp

Recommended Posts

currently i have

 

allow only numbers to be entered into db
hey guys... what im looking to do is let users enter a time via text box so 10:36.2 for example



currently i have

<?php
if (($_POST["pb"] == "") || (!preg_match(???????, $_POST["pb"])))
{
    $error['pb'] = true;
    $print_again = true;
    $message = "The pb was not in time format.<br>";
} ?>

 

but what would go in ??? to allow 1234567890 and ":" and "."

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.