FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » problem with many buttons
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
problem with many buttons [message #182805] Mon, 16 September 2013 06:25 Go to previous message
Avnesh Shakya is currently offline  Avnesh Shakya
Messages: 2
Registered: September 2013
Karma:
Junior Member
hi,
I have a problem, I have created lot of blogs in my site, and i put those as button, so when i click on button(e.i. blog name), then it should be redirect on other page like. Now I am on page like localhost/blog/blogName.php, here I have all blog buttons, after clicking on a particular button, it should go on localhost/blog/commentShow.php?id=blogName, here blogName is a name of blog that button contains.

I am doing in page localhost/blog/blogName.php
<?php
$blogIds = 0;
$sql = "SELECT * FROM user_blogs";
$result = mysqli_query($con, $sql);
while($row = mysqli_fetch_array($result))
{
echo "<ul class='ulBullet horLine'>";
echo "<li>".$row['description']."</li>";
$bgname = 'bgname'.$blogIds;
echo "<li><button id=$bgname onclick = return(blogId($this))>".$row['blogs_name']."</button></li>";
$next = "SELECT * FROM users WHERE user_id=$row[user_id]";
$result12 = mysqli_query($con, $next);
$row12 = mysqli_fetch_array($result12);
echo "<li style=''><button class=''>".$row12['usename']."</button></li>";
echo '</ul>';
$blogIds++;
}
?>
in last, i added
<?php
echo "<script type='text/javascript'>function blogId($bgid) { top..location.href = './blogComment.php?id=$bgid'; };</script>";
?>

it is going on that page but not contaid this value...

please help me, what's wrong with me...

thanks and regards,
Avnesh Shakya
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Confirm PG-related segfault in current PHP version
Next Topic: syntax error or notepad++ error?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 06:13:29 GMT 2024

Total time taken to generate the page: 0.07275 seconds