validation of url in php
<p>i have phpmydatagrid where separate buttons are available for users to enter,delete and edit datas.there is a column for entering url and i want to validate it(Eg:I want all the users to enter the full url with the http or https request and it should not be just www.something.com) and i want to know where exactly to enter the syntax 
I have attached the coding for the phpmydatagrid.</p>

<p>



phpMyDatagrid - Sample file</p>

<p>

<pre><code>/* Include class file */
include ("phpmydatagrid.class.php");

/* Create object */
$objGrid = new datagrid;

/* Define the "FORM" will be named employee and Must be 
   created by the grid script */
$objGrid -&gt; form('employee', true);

/* Connect with the database */
$objGrid -&gt; conectadb("localhost", "root", "mysql", "probe_config");

/* Select the table to use */
$objGrid -&gt; tabla ("measurementurl");

$objGrid -&gt; buttons(addbtn,updbtn,delbtn,false);




$objGrid -&gt; datarows(5);

$objGrid -&gt; paginationmode('mixed');


/* Define fields to show */

  $objGrid -&gt; FormatColumn("id", "ID", 30, 30, 0, "150", "left");
$objGrid -&gt; FormatColumn("name", "NAME", 30, 30, 0, "50", "right");
$objGrid -&gt; FormatColumn("url", "url", 90, 90, 0, "90", "left");
    $objGrid -&gt; FormatColumn("comment", "COMMENT", 30, 30, 0, "150", "left");


$objGrid -&gt; keyfield("id");



/* The setHeader function MUST be set between the &lt;HEAD&gt; and &lt;/HEAD&gt; 
   to correctly set the CSS and JS parameters */
$objGrid -&gt; setHeader();
</code></pre>

<p>?></p>

<p></p>

<p>


<pre><code>$objGrid -&gt; ajax("silent");

/* draw the grid */
    $objGrid -&gt; grid();


/* Disconnect from database */
$objGrid -&gt; desconectar();
</code></pre>

<p>?></p>

<p><a href="http://localhost:8080/admin%20screen.html" rel="nofollow">home</a></p></p>

<p>
</p>
