Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok dito

Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

ang lufet mo idol aj_chichi :excited:..

putek yun lang pala amf kailangan lang ipasok sa isa pang variable :slap:

maraming thank you!!!!
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

<?php
$users = array(
"maver" => "maver",
"pogi" => "pogi",
"nice" => "nice",
"super" => "super",
"lala" => "lala",);

function user_valid($username,$passwords){
global $users;

foreach($username as $key !== $passwuord as $key1) {
return true;
user_valid();
}
else {
return false
user_valid();
}



?>

di ko maayos toh pahelp nmn po.. :( hoho sa login form po yan...
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

<?php
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
$login = isset($_POST['login']) ? $_POST['login'] : '';

function user_valid($username, $password){
global $users;

$users = array(
"maver" => "maver",
"pogi" => "pogi",
"nice" => "nice",
"super" => "super",
"lala" => "lala",
);
foreach($username as $key=>$users){

if($key == $passwords){
return true;
}
else{
return false;
}
}

?>

:weep: anu mali dito? :(

<html>
<head>
<title>Login Form</title>
</head>

<body>
<form method="post" action="auth.php">
Username: <input type="text" name="username" />

Password: <input type="password" name="password" />

<input type="submit" value="Login" />

</form>
</body>
</html>
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Code:
<?php
    $username = $_REQUEST['username'];
    $password = $_REQUEST['password'];
    
    $login = isset($_POST['login']) ? $_POST['login'] : '';

    function user_valid($username, $password)
    {
        global $users;

        $users = array(
            "maver" => "maver",
            "pogi" => "pogi",
            "nice" => "nice",
            "super" => "super",
            "lala" => "lala",
        );
        
        foreach ($users as $key => $value) /* fetch the array users not the username. */
        {
            if ($key == $username && $value == $password) /* Added condition if username is a valid user and has valid password. */
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    } /* Missing }. */
?>
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

hi mga ka sb, papatulong lang sana dito ehe,,
ganito kasi yun

gusto ko kapag nacheck ko lahat ng checkbox madedelete siya or maeedit kapag pinundot ko ung delete button or edit button,

paano ko ba gagawin un? sabi ng prof namin gagamit daw ng array kaso wala pa akong idea dun since bago pa ako sa php.

patulong naman kailangan ko na kasi siya magawa ngaun eh, :help:

naka attach na po ung sql file
gawa po muna kau database name: dblib
den dun niyo po import ung dblib.sql

Code:
<?php
$con=mysql_connect('localhost','root','');
mysql_select_db('dblib',$con);

if(isset($_POST['submit'])){

	
$qstring="select * from bookrecords";
$result=mysql_query($qstring);



}

else{

$qstring="select * from bookrecords";
$result=mysql_query($qstring);

}


?>
<html>

<title>Library Circulation System</title>
<style type="text/css">

hr 
{
  color:SpringGreen;
  height:2;
  width:100%;
}

a
{
  font-size:12pt;
  text-decoration:none;
  
}

.class1 a:link
{
  color:white;
  text-align:center;
  font-family:Arial Black;
  font-size:11pt;
  border:2px outset gold;
  zoom:1.1;
  color:0;
  width:50;
  height:30;
  background-color:#FFD700;
}

.class1 a:visited 
{
  color:0;
  text-align:center;
}

.class1 a:hover 
{
  font-family:Arial Black;
  font-size:11pt;
  border:2px outset gold;
  zoom:1.1;
  color:0;
  width:50;
  height:30;
  background-color:cyan;
  cursor: url(cursor.ani);
}

.class2 a:link
{
  font-family:Hobo std;
  color:snow;
  
  border:2px outset green;
  
}

.class2 a:visited 
{
  font-family:Hobo std;
  color:snow;
}

.class2 a:hover 
{
  font-family:hobo std;
  font-size:12pt;
  color:cyan;
  cursor: url(cursor.ani);
}


h1
{
  font-family:Hobo std;
  text-align:center;
  color:snow;
  font-size:25px;
}

td
{
  font-family:comic sans ms;
  color:snow;
  font-size:8pt;
  text-align:center;
  line-height:150%;
  font-style:thinner;
}

body 
{

  background-color:black;
  background-attachment:fixed;
  background-position:center;
  background-repeat:no-repeat;
  scrollbar-arrow-color:red;
  scrollbar-base-color:#FF6347;
  scrollbar-darkshadow-color:#006600;
  scrollbar-face-color:#FFF0F5;
  scrollbar-highlight-color:#1E90FF;
  cursor:url(sjcb.ani);
}

</style>

<body><span class=1>
<table height=100% width=100% cellpadding=0 cellspacing=0 bordercolor=white borderstyle=double align="center">
	<tr>
		<td valign=top><h1><br><form method="POST">
		BOOK RECORDS</h1><input type="submit" name="submit" value="View"  STYLE="font-size:15; background-color:green; color:white; border-color=red">
		</form><hr><br>
<table border ="1" width=100% align=center valign="top">
	<tr align=center valign=top>
			<td>Select</td>
			<td>ISBN</td>
			<td>Author</td>
			<td>Title</td>
			<td>Copyright</td>
			<td>Location</td>
			<td>No. of Books</td>
			<td>Date of Purchase</td>
	</tr>
<?php
	while($row=mysql_fetch_assoc($result)){
?>
	<tr align=center>
		<td><input type="checkbox" id="check1" /></td>
		<td><?php echo $row['ISBN']; ?></td>
		<td><?php echo $row['Author']; ?></td>
		<td><?php echo $row['Title']; ?></td>
		<td><?php echo $row['Copyright']; ?></td>
		<td><?php echo $row['Location']; ?></td>
		<td><?php echo $row['No.ofBooks']; ?></td>	
		<td><?php echo $row['Dateofpurchase']; ?></td>	
	</tr>

<?php
	}
?>
</table>
		</td>
		
	</tr>
</table><center>
<span class="class2">
		<a href="ADD.php" class=2>ADD</a>
</span>
<input type="submit" name="submit" value="EDIT"  STYLE="font-size:15; background-color:green; color:white; border-color=red">
<input type="submit" name="submit" value="DELETE"  STYLE="font-size:15; background-color:green; color:white; border-color=red">

<center>

</body>
</html>
 

Attachments

  • untitled.JPG
    untitled.JPG
    78.8 KB · Views: 6
  • dblib.rar
    1.4 KB · Views: 0
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Create an array name for your checkboxes

Code:
<td><input type="checkbox" id="check1" /></td>
into

Code:
<td><input type="checkbox" name="myCheckBox[]" id="check1" value="<?php echo $row["ISBN"]; ?>" /></td>
Dun naman sa PHP.

Code:
if (isset($_POST["submit"]))
{
    $checkBoxes = $_POST["myCheckBox"];

    var_dump($checkBoxes); /* Only checked boxes should be dumped. */

    if ($_POST["submit"] == "EDIT")
    {
        $query = mysql_query("UPDATE bookrecords SET (field1, field2) = ('value1', 'value2') WHERE ISBN IN ('" . implode("', '", $checkBoxes) . "')");
    }
    elseif ($_POST["submit"] == "DELETE")
    {
        $query = mysql_query("DELETE FROM bookrecords WHERE ISBN IN ('" . implode("', '", $checkBoxes) . "')");
    }
}
else
{
    /* No submission done code in here. */
}


Edit: You need to put your table into the form, so with the <input type="submit"> tags.
 
Last edited:
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

susulitin ko na po ang pagtatanong ehe

sa attachment po bakit kaya lumalabas ung mga codes sa browser, tama naman po ata ung code kasi copy paste ko lang siya sa isang tutorial website ng php.. help help pls gusto ko matuto ng php :help:

Code:
<html>
<head>
<title>Your Fav Artist!</title>
</head>

<body>
<?php
//checking for submit (first isset)
if (!isset($_POST['submit'])) {
//display form
?>
<form action = "<?php echo $_SERVER['PHP_SELF']; ?>" method = "POST">
<input type="checkbox" name="artist[]" value="Bon Jovi">Bon Jovi<br />
<input type="checkbox" name="artist[]" value="N Sync">N Sync<br />
<input type="checkbox" name="artist[]" value="Boyzone">Boyzone<br />
<input type="checkbox" name="artist[]" value="Britney Spears">Britney Spears<br />
<input type="checkbox" name="artist[]" value="Jethro Tull">Jethro Tull<br />
<input type="checkbox" name="artist[]" value="Crosby, Stills & Nash">Crosby, Stills & Nash<br />
<input type = "submit" name = "submit" value = "select">
</form>
<?php
}
else {
//take the second isset
if (!isset($_POST['artist'])) {
echo "Nothing selected. <br />";
}
else {
echo ‘You selected :<br />’ ;
foreach ($_POST['artist'] as $a) {
echo "<b>$a</b> <br />";
}

}
}
?>
</body>
</html>
 

Attachments

  • untitled3.JPG
    untitled3.JPG
    23.9 KB · Views: 4
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Create an array name for your checkboxes

Code:
<td><input type="checkbox" id="check1" /></td>
into

Code:
<td><input type="checkbox" name="myCheckBox[]" id="check1" value="<?php echo $row["ISBN"]; ?>" /></td>
Dun naman sa PHP.

Code:
if (isset($_POST["submit"]))
{
    $checkBoxes = $_POST["myCheckBox"];

    var_dump($checkBoxes); /* Only checked boxes should be dumped. */

    if ($_POST["submit"] == "EDIT")
    {
        $query = mysql_query("UPDATE bookrecords SET (field1, field2) = ('value1', 'value2') WHERE ISBN IN ('" . implode("', '", $checkBoxes) . "')");
    }
    elseif ($_POST["submit"] == "DELETE")
    {
        $query = mysql_query("DELETE FROM bookrecords WHERE ISBN IN ('" . implode("', '", $checkBoxes) . "')");
    }
}
else
{
    /* No submission done code in here. */
}


Edit: You need to put your table into the form, so with the <input type="submit"> tags.



salamat talaga sir, nagawa ko na, marami pa aqong tanong eh pero saka na ehehe gagawin ko muna dapat gawin :lol:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Code:
<?php
    $username = $_REQUEST['username'];
    $password = $_REQUEST['password'];
    
    $login = isset($_POST['login']) ? $_POST['login'] : '';

    function user_valid($username, $password)
    {
        global $users;

        $users = array(
            "maver" => "maver",
            "pogi" => "pogi",
            "nice" => "nice",
            "super" => "super",
            "lala" => "lala",
        );
        
        foreach ($users as $key => $value) /* fetch the array users not the username. */
        {
            if ($key == $username && $value == $password) /* Added condition if username is a valid user and has valid password. */
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    } /* Missing }. */
?>



sir SALAMAT :weep: MARAMING THANK YOU.. sir pano namn kung pagkatapos ko maglogin eiy PUPUnta na ako sa HOME page ganun? san ko isisingit yunge header('Location: home.php'); san sir?:noidea:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

sa baba ba ng return true.. :noidea: paturo sir.. :(
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

pa help naman po ulit, may lumalabas kasi ng codings, ung nakahighlight po sa image attachment ko,


ito po ung code, salamat:help:

Code:
<?php
$con=mysql_connect('localhost','root','');
mysql_select_db('dblib',$con);

if(isset($_POST['submit'])){
    $checkBoxes = $_POST["myCheckBox"];
    var_dump($checkBoxes);
    if ($_POST["submit"] == "EDIT")
    {
        $query = mysql_query("UPDATE bookrecords SET (field1, field2) = ('value1', 'value2') WHERE ISBN IN ('" . implode("', '", $checkBoxes) . "')");
    }
    elseif ($_POST["submit"] == "DELETE")
    {
        $query = mysql_query("DELETE FROM bookrecords WHERE ISBN IN ('" . implode("', '", $checkBoxes) . "')");
    }
	
$qstring="select * from bookrecords";
$result=mysql_query($qstring);



}

else{

$qstring="select * from bookrecords";
$result=mysql_query($qstring);

}


?>
<html>

<title>Library Circulation System</title>
<style type="text/css">

hr 
{
  color:SpringGreen;
  height:2;
  width:100%;
}

a
{
  font-size:12pt;
  text-decoration:none;
  
}

.class1 a:link
{
  color:white;
  text-align:center;
  font-family:Arial Black;
  font-size:11pt;
  border:2px outset gold;
  zoom:1.1;
  color:0;
  width:50;
  height:30;
  background-color:#FFD700;
}

.class1 a:visited 
{
  color:0;
  text-align:center;
}

.class1 a:hover 
{
  font-family:Arial Black;
  font-size:11pt;
  border:2px outset gold;
  zoom:1.1;
  color:0;
  width:50;
  height:30;
  background-color:cyan;
  cursor: url(cursor.ani);
}

.class2 a:link
{
  font-family:Hobo std;
  color:snow;
  
  border:2px outset green;
  
}

.class2 a:visited 
{
  font-family:Hobo std;
  color:snow;
}

.class2 a:hover 
{
  font-family:hobo std;
  font-size:12pt;
  color:cyan;
  cursor: url(cursor.ani);
}


h1
{
  font-family:Hobo std;
  text-align:center;
  color:snow;
  font-size:25px;
}

td
{
  font-family:comic sans ms;
  color:snow;
  font-size:8pt;
  text-align:center;
  line-height:150%;
  font-style:thinner;
}

body 
{

  background-color:black;
  background-attachment:fixed;
  background-position:center;
  background-repeat:no-repeat;
  scrollbar-arrow-color:red;
  scrollbar-base-color:#FF6347;
  scrollbar-darkshadow-color:#006600;
  scrollbar-face-color:#FFF0F5;
  scrollbar-highlight-color:#1E90FF;
  cursor:url(sjcb.ani);
}

</style>

<body><span class=1>
<table height=100% width=100% cellpadding=0 cellspacing=0 bordercolor=white borderstyle=double align="center">
	<tr>
		<td valign=top><h1><br><form method="POST">
		BOOK RECORDS</h1><input type="submit" name="submit" value="View"  STYLE="font-size:15; background-color:green; color:white; border-color=red">
		<hr><br>
<table border ="1" width=100% align=center valign="top">
	<tr align=center valign=top>
			<td>Select</td>
			<td>ISBN</td>
			<td>Author</td>
			<td>Title</td>
			<td>Copyright</td>
			<td>Location</td>
			<td>No. of Books</td>
			<td>Date of Purchase</td>
	</tr>
<?php
	while($row=mysql_fetch_assoc($result)){
?>
	<tr align=center>
		<td><input type="checkbox" name="myCheckBox[]" id="check1" value="<?php echo $row["ISBN"]; ?>" /></td>
		<td><?php echo $row['ISBN']; ?></td>
		<td><?php echo $row['Author']; ?></td>
		<td><?php echo $row['Title']; ?></td>
		<td><?php echo $row['Copyright']; ?></td>
		<td><?php echo $row['Location']; ?></td>
		<td><?php echo $row['No.ofBooks']; ?></td>	
		<td><?php echo $row['Dateofpurchase']; ?></td>	
	</tr>

<?php
	}
?>
</table>
		</td>
		
	</tr>
</table><center>
<span class="class2">
		<a href="ADD.php" class=2>ADD</a>
</span>
<input type="submit" name="submit" value="EDIT"  STYLE="font-size:15; background-color:green; color:white; border-color=red">
<input type="submit" name="submit" value="DELETE"  STYLE="font-size:15; background-color:green; color:white; border-color=red"></form>

<center>

</body>
</html>
 

Attachments

  • asd.JPG
    asd.JPG
    66.6 KB · Views: 6
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

foreach ($users as $key => $value) /* fetch the array users not the username. */
{
if ($key == $username && $value == $password) /* Added condition if username is a valid user and has valid password. */
{
return true;
}
else
{
return false;
}
}
}

user_valid(){
header('Location: home.php');
}



/* Missing }. */
?>


dun sa mising ko ilalagay?


foreach ($users as $key => $value) /* fetch the array users not the username. */
{
if ($key == $username && $value == $password) /* Added condition if username is a valid user and has valid password. */
{
return true;
}
else
{
return false;
}
}
}

/* Missing }. */
?>
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Code:
<html>
    <head>
        <title>Your Fav Artist!</title>
    </head>
    <body>
        <?php
            //checking for submit (first isset)
            if ( ! isset($_POST['submit']))
            {
                //display form
        ?>
                <form action = "<?php echo $_SERVER['PHP_SELF']; ?>" method = "POST">
                    <input type="checkbox" name="artist[]" value="Bon Jovi">Bon Jovi<br />
                    <input type="checkbox" name="artist[]" value="N Sync">N Sync<br />
                    <input type="checkbox" name="artist[]" value="Boyzone">Boyzone<br />
                    <input type="checkbox" name="artist[]" value="Britney Spears">Britney Spears<br />
                    <input type="checkbox" name="artist[]" value="Jethro Tull">Jethro Tull<br />
                    <input type="checkbox" name="artist[]" value="Crosby, Stills & Nash">Crosby, Stills & Nash<br />
                    <input type = "submit" name = "submit" value = "select">
                </form>
        <?php
            }
            else
            {
                //take the second isset
                if ( ! isset($_POST['artist']))
                {
                    echo "Nothing selected. <br />";
                }
                else
                {
                    echo "You selected :<br />"; /* Use ('), (") only. Iba yong character na ginamit mo. */

                    foreach ($_POST['artist'] as $a)
                    {
                        echo "<b>$a</b> <br />";
                    }
                }
            }
        ?>
    </body>
</html>
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

:weep: di ko alam gumamit ng funtion..
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

wala pa sa kalahati yung gingawa ko.. pero try ko muna.. pakikorek na alng.. :( salamat po sa thread na toh...
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Good Day!! I have a table named sales and salesdetails..At present its accumulating data for almost 200 rows /day on sales and 2000rpws/day on salesdetails. My problem is what is tha maximum rows for a table?
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

Code:
<html>
    <head>
        <title>Your Fav Artist!</title>
    </head>
    <body>
        <?php
            //checking for submit (first isset)
            if ( ! isset($_POST['submit']))
            {
                //display form
        ?>
                <form action = "<?php echo $_SERVER['PHP_SELF']; ?>" method = "POST">
                    <input type="checkbox" name="artist[]" value="Bon Jovi">Bon Jovi<br />
                    <input type="checkbox" name="artist[]" value="N Sync">N Sync<br />
                    <input type="checkbox" name="artist[]" value="Boyzone">Boyzone<br />
                    <input type="checkbox" name="artist[]" value="Britney Spears">Britney Spears<br />
                    <input type="checkbox" name="artist[]" value="Jethro Tull">Jethro Tull<br />
                    <input type="checkbox" name="artist[]" value="Crosby, Stills & Nash">Crosby, Stills & Nash<br />
                    <input type = "submit" name = "submit" value = "select">
                </form>
        <?php
            }
            else
            {
                //take the second isset
                if ( ! isset($_POST['artist']))
                {
                    echo "Nothing selected. <br />";
                }
                else
                {
                    echo "You selected :<br />"; /* Use ('), (") only. Iba yong character na ginamit mo. */

                    foreach ($_POST['artist'] as $a)
                    {
                        echo "<b>$a</b> <br />";
                    }
                }
            }
        ?>
    </body>
</html>



sir ganun pa rin may lumalabas pa rin na codings >_< ano kaya problema d2, browser kaya..., na test ko na din kasi sa google chrome ganun din:upset:
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

pa help naman po ulit, may lumalabas kasi ng codings, ung nakahighlight po sa image attachment ko,


ito po ung code, salamat:help:

Code:
<?php
$con=mysql_connect('localhost','root','');
mysql_select_db('dblib',$con);

if(isset($_POST['submit'])){
    $checkBoxes = $_POST["myCheckBox"];
    var_dump($checkBoxes);
    if ($_POST["submit"] == "EDIT")
    {
        $query = mysql_query("UPDATE bookrecords SET (field1, field2) = ('value1', 'value2') WHERE ISBN IN ('" . implode("', '", $checkBoxes) . "')");
    }
    elseif ($_POST["submit"] == "DELETE")
    {
        $query = mysql_query("DELETE FROM bookrecords WHERE ISBN IN ('" . implode("', '", $checkBoxes) . "')");
    }
    
$qstring="select * from bookrecords";
$result=mysql_query($qstring);



}

else{

$qstring="select * from bookrecords";
$result=mysql_query($qstring);

}


?>
<html>

<title>Library Circulation System</title>
<style type="text/css">

hr 
{
  color:SpringGreen;
  height:2;
  width:100%;
}

a
{
  font-size:12pt;
  text-decoration:none;
  
}

.class1 a:link
{
  color:white;
  text-align:center;
  font-family:Arial Black;
  font-size:11pt;
  border:2px outset gold;
  zoom:1.1;
  color:0;
  width:50;
  height:30;
  background-color:#FFD700;
}

.class1 a:visited 
{
  color:0;
  text-align:center;
}

.class1 a:hover 
{
  font-family:Arial Black;
  font-size:11pt;
  border:2px outset gold;
  zoom:1.1;
  color:0;
  width:50;
  height:30;
  background-color:cyan;
  cursor: url(cursor.ani);
}

.class2 a:link
{
  font-family:Hobo std;
  color:snow;
  
  border:2px outset green;
  
}

.class2 a:visited 
{
  font-family:Hobo std;
  color:snow;
}

.class2 a:hover 
{
  font-family:hobo std;
  font-size:12pt;
  color:cyan;
  cursor: url(cursor.ani);
}


h1
{
  font-family:Hobo std;
  text-align:center;
  color:snow;
  font-size:25px;
}

td
{
  font-family:comic sans ms;
  color:snow;
  font-size:8pt;
  text-align:center;
  line-height:150%;
  font-style:thinner;
}

body 
{

  background-color:black;
  background-attachment:fixed;
  background-position:center;
  background-repeat:no-repeat;
  scrollbar-arrow-color:red;
  scrollbar-base-color:#FF6347;
  scrollbar-darkshadow-color:#006600;
  scrollbar-face-color:#FFF0F5;
  scrollbar-highlight-color:#1E90FF;
  cursor:url(sjcb.ani);
}

</style>

<body><span class=1>
<table height=100% width=100% cellpadding=0 cellspacing=0 bordercolor=white borderstyle=double align="center">
    <tr>
        <td valign=top><h1><br><form method="POST">
        BOOK RECORDS</h1><input type="submit" name="submit" value="View"  STYLE="font-size:15; background-color:green; color:white; border-color=red">
        <hr><br>
<table border ="1" width=100% align=center valign="top">
    <tr align=center valign=top>
            <td>Select</td>
            <td>ISBN</td>
            <td>Author</td>
            <td>Title</td>
            <td>Copyright</td>
            <td>Location</td>
            <td>No. of Books</td>
            <td>Date of Purchase</td>
    </tr>
<?php
    while($row=mysql_fetch_assoc($result)){
?>
    <tr align=center>
        <td><input type="checkbox" name="myCheckBox[]" id="check1" value="<?php echo $row["ISBN"]; ?>" /></td>
        <td><?php echo $row['ISBN']; ?></td>
        <td><?php echo $row['Author']; ?></td>
        <td><?php echo $row['Title']; ?></td>
        <td><?php echo $row['Copyright']; ?></td>
        <td><?php echo $row['Location']; ?></td>
        <td><?php echo $row['No.ofBooks']; ?></td>    
        <td><?php echo $row['Dateofpurchase']; ?></td>    
    </tr>

<?php
    }
?>
</table>
        </td>
        
    </tr>
</table><center>
<span class="class2">
        <a href="ADD.php" class=2>ADD</a>
</span>
<input type="submit" name="submit" value="EDIT"  STYLE="font-size:15; background-color:green; color:white; border-color=red">
<input type="submit" name="submit" value="DELETE"  STYLE="font-size:15; background-color:green; color:white; border-color=red"></form>

<center>

</body>
</html>


hAHAHA copy & paste lang talaga oh?

di man lang alam ano gamit ng var_dump() ng PHP?

search po nyo yan sir, makakatulong yan sa inyo specially when debugging.
 
Re: Mga Tanong tungkol sa PHP, CSS, jquery, HTML at MySQL pasok D2

<?php
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];

$login = isset($_POST['login']) ? $_POST['login'] : '';

function user_valid($username, $password)
{
global $users;

$users = array(
"maver" => "maver",
"pogi" => "pogi",
"nice" => "nice",
"super" => "super",
"lala" => "lala",
);

foreach ($users as $key => $value) /* fetch the array users not the username. */
{
if ($key == $username && $value == $password) /* Added condition if username is a valid user and has valid password. */
{
return true;
}
else
{
return false;
}
}
}

user_valid(){
header('Location: home.php');
}

function log_in($user){

$username = \di ko alam lalagay ko\;

}


function current_user(){

$username = log_in();



}



hehehe yaw magrun.. :(
















/* Missing }. */
?>
 
Back
Top Bottom