hi everyone,
I have some problem about simplifying my php code.
At first I want to load my form and then load my information from database if their are any data exists according to the user name.
Actually the problem is,I want to load the js while the information is their.
<?php
$data=mysql_fetch_array[$result];
if($data[0]!=0){
echo"?>
<script>
document.getElementById('text1').value="<?php echo $data[0]";
document.getElementById('text2').value="<?php echo $data[1]";
</script>
<?php
}
?>
thats it..!!
But I want to write it in my js.That will load if data exists.
If their have any alternative way??