❓ Help Patulong sa mga master sa php

Status
Not open for further replies.

djblazerx

Forum Veteran
patulong mga sir eto yung error
Parse error: syntax error, unexpected 'SELECT' (T_STRING), expecting ')'

eto yung code

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

if (!$con) {
die('Not connected : ' . mysql_error());
}

$sql="SELECT * FROM 'blog_posts'";

$result = mysql_query($sql);

while($row = mysql_fetch_array($result)){

?>
<p><?php echo $row['post_title'];?></p>
<p> by <?php echo $row['author_name'];?> on <?php echo $row['post_date'];?></p>
<p><?php echo $row['content']; ?></p>
<?php } ?>
 

Attachments

  • 1583840370333.webp
    1583840370333.webp
    17.7 KB · Views: 18
Status
Not open for further replies.

Similar threads

About this Thread

  • 0
    Replies
  • 227
    Views
  • 1
    Participants
Last reply from:
djblazerx

Trending Topics

Online now

Members online
1,065
Guests online
816
Total visitors
1,881

Forum statistics

Threads
2,276,986
Posts
28,973,619
Members
1,229,681
Latest member
HawFlakes
Back
Top