About Me

My photo

I am Ram, a Web Designer and Developer.   More than 4  years of experience in software development. Created complex back-end management systems including content management, e-commerce, customer relations and communication interfaces. The projects based on PHP in conjunction. PHP, SQL, JavaScript, AJAX, XHTML, CSS (Responsive), I help people make beautiful websites, functional applications and seamless user experiences.

Saturday, 23 August 2014

PHP mysql_fetch_array() While function

<?php
mysql_connect('localhost', 'root', '');
 mysql_select_db("newcode");
 $q=$_GET["q"];
 $sql="SELECT *  FROM table_name WHERE name_en = '".$q."'";

  $result = mysql_query($sql);

  while($row = mysql_fetch_array($result))
  {
   echo $row['name'];
  }

  mysql_close();
  ?>
 
 

No comments:

Post a Comment