What's new

Closed Help!

Status
Not open for further replies.

joseephftw

Honorary Poster
Joined
Dec 22, 2015
Posts
412
Reaction
48
Points
248
Age
27
Ayaw madisplay nung mga ininput kong mga information help please!

<!DOCTYPE html>
<html>
<head>
<title>PHP/MySQLi CRUD Operation using Bootstrap/Modal</title>
<script src="You do not have permission to view the full content of this post. Log in or register now."></script>
<link rel="stylesheet" href="You do not have permission to view the full content of this post. Log in or register now." />
<script src="You do not have permission to view the full content of this post. Log in or register now."></script>
</head>
<body>
<div class="container">
<div style="height:50px;"></div>
<div class="well" style="margin:auto; padding:auto; width:80%;">
<span style="font-size:25px; color:blue"><center><strong>Guidance Management System</strong></center></span>
<span class="pull-left"><a href="#addnew" data-toggle="modal" class="btn btn-primary"><span class="glyphicon glyphicon-plus"></span> Add New</a></span>
<div style="height:50px;"></div>
<table class="table table-striped table-bordered table-hover">
<thead>
<th>Firstname</th>
<th>Lastname</th>
<th>Address</th>
<th>Course</th>
<th>Year</th>
<th>Contact Number</th>
<th>Action</th>
</thead>
<tbody>
<?php
include('conn.php');

$query=mysqli_query($conn,"select * from `user`");
while($row=mysqli_fetch_array($query)){
?>
<tr>
<td><?php echo $row['firstname']; ?></td>
<td><?php echo $row['lastname']; ?></td>
<td><?php echo $row['address']; ?></td>
<td><?php echo $row['course']; ?></td>
<td><?php echo $row['year']; ?></td>
<td><?php echo $row['contactnumber']; ?></td>
<td>
<a href="#edit<?php echo $row['userid']; ?>" data-toggle="modal" class="btn btn-warning"><span class="glyphicon glyphicon-edit"></span> Edit</a> ||
<a href="#del<?php echo $row['userid']; ?>" data-toggle="modal" class="btn btn-danger"><span class="glyphicon glyphicon-trash"></span> Delete</a>
<?php include('button.php'); ?>
</td>
</tr>
<?php
}

?>
</tbody>
</table>
</div>
<?php include('add_modal.php'); ?>
</div>
</body>
</html>

Eto yung index.php ko help please
 

Attachments

Last edited:
try mo tanggalin yung single quote sa table na user

"select * from user"

then try mo rin tanggalin yung $conn
 
sir nasan kana kailangan ko ng tulong mo :(
$jc = mysql_query("SELECT * FROM user"); // pag ayaw pa din palitan mo ung query ng "SELECT * FROM user LIMIT 30"

echo '<table border=1px>';
echo'<th>Id</th><th>firstname</th><th>lastname</th><th>address</th>'; //dagdagan mo nalang pag gumana

while($data = mysql_fetch_array($jc))
{

echo'<tr>';
echo '<td>'.$data['id'].'</td>
<td>'.$data['firstname'].'</td><td>'.$data['lastname'].'</td><td>'.$data['address'].'</td>';
echo'</tr>'; // tanggalin mo nlng ung id pag ayaw mo
}

echo '</table>';
 
$jc = mysql_query("SELECT * FROM user"); // pag ayaw pa din palitan mo ung query ng "SELECT * FROM user LIMIT 30"

echo '<table border=1px>';
echo'<th>Id</th><th>firstname</th><th>lastname</th><th>address</th>'; //dagdagan mo nalang pag gumana

while($data = mysql_fetch_array($jc))
{

echo'<tr>';
echo '<td>'.$data['id'].'</td>
<td>'.$data['firstname'].'</td><td>'.$data['lastname'].'</td><td>'.$data['address'].'</td>';
echo'</tr>'; // tanggalin mo nlng ung id pag ayaw mo
}

echo '</table>';

sa index.php yan sir?
 
$jc = mysql_query("SELECT * FROM user"); // pag ayaw pa din palitan mo ung query ng "SELECT * FROM user LIMIT 30"

echo '<table border=1px>';
echo'<th>Id</th><th>firstname</th><th>lastname</th><th>address</th>'; //dagdagan mo nalang pag gumana

while($data = mysql_fetch_array($jc))
{

echo'<tr>';
echo '<td>'.$data['id'].'</td>
<td>'.$data['firstname'].'</td><td>'.$data['lastname'].'</td><td>'.$data['address'].'</td>';
echo'</tr>'; // tanggalin mo nlng ung id pag ayaw mo
}

echo '</table>';
sir need ko lang maretrieve yung mga info na nilalagay ko T_T
 
Status
Not open for further replies.

Similar threads

Back
Top