Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

You need to loop through the data:

<?php
include('connect.php');
$idno = (integer) $_POST['idno'];
$sql="select * from stud where ID_No='$idno';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s['Home_addr'];
    echo "$addr";
}
?>

Also, please don't use mysql_* functions to write new code. They are no longer maintained and the community has begun deprecation process. See the red box? Instead you should learn about prepared statements and use either PDOPDO or MySQLi. If you can't decide which, this article will help you. Also see Why shouldn't I use mysql functions in PHP?Why shouldn't I use mysql functions in PHP?

You need to loop through the data:

<?php
include('connect.php');
$idno = (integer) $_POST['idno'];
$sql="select * from stud where ID_No='$idno';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s['Home_addr'];
    echo "$addr";
}
?>

Also, please don't use mysql_* functions to write new code. They are no longer maintained and the community has begun deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide which, this article will help you. Also see Why shouldn't I use mysql functions in PHP?

You need to loop through the data:

<?php
include('connect.php');
$idno = (integer) $_POST['idno'];
$sql="select * from stud where ID_No='$idno';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s['Home_addr'];
    echo "$addr";
}
?>

Also, please don't use mysql_* functions to write new code. They are no longer maintained and the community has begun deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide which, this article will help you. Also see Why shouldn't I use mysql functions in PHP?

future-proof against injection attacks and offer alternatives such as PDO or mysql via explanation message
Source Link
Daedalus
  • 7.7k
  • 5
  • 40
  • 64

You need to loop through the data:

<?php
include('connect.php');
$idno = (integer) $_POST['idno'];
$sql="select * from stud where ID_No='$_POST[idno]';";ID_No='$idno';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s['Home_addr'];
    echo "$addr";
}
?>

Also, please don't use mysql_* functions to write new code. They are no longer maintained and the community has begun deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide which, this article will help you. Also see Why shouldn't I use mysql functions in PHP?

You need to loop through the data:

<?php
include('connect.php');
$sql="select * from stud where ID_No='$_POST[idno]';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s['Home_addr'];
    echo "$addr";
}
?>

You need to loop through the data:

<?php
include('connect.php');
$idno = (integer) $_POST['idno'];
$sql="select * from stud where ID_No='$idno';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s['Home_addr'];
    echo "$addr";
}
?>

Also, please don't use mysql_* functions to write new code. They are no longer maintained and the community has begun deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide which, this article will help you. Also see Why shouldn't I use mysql functions in PHP?

fix key string/add space after `echo`
Source Link
Daedalus
  • 7.7k
  • 5
  • 40
  • 64

You need to loop through the data:

<?php
include('connect.php');
$sql="select * from stud where ID_No='$_POST[idno]';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s[Home_addr];$s['Home_addr'];
    echo"$addr";echo "$addr";
}
?>

You need to loop through the data:

<?php
include('connect.php');
$sql="select * from stud where ID_No='$_POST[idno]';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s[Home_addr];
    echo"$addr";
}
?>

You need to loop through the data:

<?php
include('connect.php');
$sql="select * from stud where ID_No='$_POST[idno]';";
$result=mysql_query($sql);
while ($s=mysql_fetch_array($result)) {
    $addr = $s['Home_addr'];
    echo "$addr";
}
?>
Source Link
Daedalus
  • 7.7k
  • 5
  • 40
  • 64
Loading