<HTML><HEAD>
<?php
$ids = ("number.txt");
$id = file($ids);
   echo  $id[0]
 ?>
  <INPUT value=("$id[0]")  name="number"> 
</HEAD><BODY>
 
</BODY></HTML>

How come <INPUT value=("$id[0]") dos not = the out put 5 or what ever ("number.txt") is ?

it should be in a read only text box id = number.

<html>
<head>
</head>
<body>
<?php
$ids = ("numbers.txt");//make sure the file is in the same directory as the php script
$id = file($ids);
?>
<input value="<?php echo $id[0];?>" name="number" readonly="readonly" />
</body>
</html>

I hope this help, else please state your objective clearly

<html>
<head>
</head>
<body>
<?php
$ids = ("numbers.txt");//make sure the file is in the same directory as the php script
$id = file($ids);
?>
<input value="<?php echo $id[0];?>" name="number" readonly="readonly" />
</body>
</html>

I hope this help, else please state your objective clearly

<html>
<head>

<?php
$ids = ("numbers.txt");//make sure the file is in the same directory as the php script
$id = file($ids);
?>
<input value="<?php echo $id[0];?>" name="number" readonly="readonly" />


</head>
<body>

</body>
</html>

thank you very much saadsaidi , had to move it to the head and it seems to work very well, thank you again. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.