Triniton722
-
Posts
6 -
Joined
-
Last visited
Posts posted by Triniton722
-
-
<?php
$con=mysqli_connect("","root","","tibiblog");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM articles");
while($row = mysqli_fetch_array($result)) {
echo $row['title'] . " " . $row['summary'] . " " .$row['link'];
echo "<br>";
}
mysqli_close($con);
?> -
Hello.
I have a bit of a problem. When I fetch the link field from the database.i don't see an actual link on the page.
One more thing, what type of field should I use to store the link in the database? Probably there is where I went wrong.
All help is
-
<style rel="stylesheet" type="text/css"> #navcontainer ul { list-style-type: none; margin: 4; padding: 4; width: 100%;} #navcontainer ul li {display:inline-block; width: 7%; text-align: center; border-right: 1px solid #000; margin:0; padding: 2px 0; } #navcontainer ul li a { text-decoration: none; font-size: 18px; color: black; background-color: #FFFFFF;} #navcontainer ul li a:hover { color: darkblue; background-color: #FFFFFF; text-decoration:underline; font-weight:bold;} </style> </head> <body> <div id="navcontainer"> <ul> <li> <a href="#"> Home</a></li> <li>|<a href="#"> Project listing</a></li> <li>|<a href="#"> Directory</a></li> <li>|<a href="#"> Create project</a></li> <li>|<a href="#"> My project</a></li> </ul> </div> </body> </html>
That is because #navcontainer ul li does not have a defined width attribute so it will take up all the space you are allowing to. Notice the width: 7%; the padding and the margin. By setting the width to 7% you are imposing specific width.
I hope I could help
-
It is pretty hard for use to analyse the code, next time try to put the code into the <> tags (next to the comment box in the forum editor). Anyway, I copy/pasted your code into an Editor and the only reference to read-more are between the lines 62 until 67.
Remove the content between the lines and everything should work just fine.
Hope I could help.
-
.myimg { position:relative; width:40%; top:0px; } .myimg:hover { width:80%; z-index:9999; ; margin-top: -10%; }
Tyoe this inside the CSS file and it should work. I think the CSS it's pretty self explanatory.
I hope I could help
How do I retrieve a link from a MySQL database so that it behaves like a link in the PHP page,
in MySQL Help
Posted
Thanks! I appreciate a lot your help.