lAZLf
-
Posts
89 -
Joined
-
Last visited
Never
Posts posted by lAZLf
-
-
I want to know what the benefits and disadvantages are of using <ul> and <li> tags instead of the usual <div> tags.
-
I found the problem. Since my pages are made in PHP, I forgot to type in the DTD.
Nooby mistake.
-
On my website, I have this column that I want to be a specific height. It just occurred to me that on firefox (i use normally use safari), the height of the column in the table is way off. Could I target which browser displays which amount of pixels?
In safari I want it to be 200px and in firefox I want it to be 140px.
-
Thanks! That's what I needed!
-
I need a page to go back one page in the browser history. How would I do this?
(NOTE: I know this can be done in JavaScript, but I want it in PHP)
-
Yes, I'm hand coding it. Well, I'm using dreamweaver, but i'm hand coding it.
-
I'm building an admin control panel. I saw that no one was commenting so I decided to go ahead with it. I'll take it off.
It's working now, look now.
-
Style wise it looks great imo except for the button and links. Try different colors and fonts for the links/buttons.
-
I got it now, thanks everyone!
-
^....that makes a lot of sense....
-
I'd like to know what you guys think of my website on a local city. It's still is incomplete. I know there is blank space, it will be filled up soon, and no register page. I'm still in the "testing" stage of the website. I want to know what you guys think of it style wise.
-
Like Japesu said, in CSS use the
.yourclasshere { background-image: normalbg.jpg; } .yourclasshere:hover { background-image: glowbg.jpg; }
I don't recommend using java script, it makes it in a sense more complicated when it doesn't have to be, and someone can easily turn off javascript on their browser.
Like everyone said. This is not PHP.
-
I need to store images in a database because i'm creating a forum-ish page on my website and I want to be able to get each persons avatar next to their posts. Similar to how this forum pulls out peoples avatars. Do forums do this through something else and not a database?
-
while($row=mysql_fetch_array($get)){ echo' your data is:'.$get['datafieldhere']; }
-
So I found this script (http://www.wellho.net/mouth/937_Display-an-image-from-a-MySQL-database-in-a-web-page-via-PHP.html) to display images from a database, the only thing I don't know is what type of data (blob, binary, etc) should the image be in the database, and how to insert an image into the database.
-
Thanks thorpe, I got it.
-
Then how do they work?
-
Because I will be uploading things to the database ALL THE TIME. I'm most certainly not going to take the time to manually create a new file for each and every entry.
-
It won't be the same, it will get information via database. If you want to see the code in action so far go to http://www.annarboruncovered.com/
You'll see that with the "while" loop it takes all the information out of the database, and displays something different in each row of the table. The same concept will be with the new pages, but they will only display the "feed" i post per page, where then I will make it so that users can comment on them.
-
I want to be able to store a whole php/html code on a variable so it would be easier for me to write it to a file.
Why do you want to do that?
If you read the code I posted, It is writing/editing files. I want to be able to write a page similar to the current one, but of course I will change it a bit. I figured it would make more sense to use a variable in the fwrite(); function.
-
Not sure I know what you mean. What would you then do with this variable?
The OP says he want to write it to a file.
The easiest way to do this would be using the nowdoc syntax to specify the string, but that requires PHP 5.3.0. Any other method potentially involves a lot of escaping.
how do you escape strings? As far as I know I haven't ever done it.
-
$construct = "SELECT * FROM flats WHERE [table-column you want goes here] =$construct";
Try that and see how it works. Should be the only problem you have there.
-
Sorry if the question isn't too clear.
How would I store the code above as a single variable?
-
I'm sure you can, but how?
I have a page that creates a new page for every feed on it. I want to be able to store a whole php/html code on a variable so it would be easier for me to write it to a file. I'm sure this is an easy to solve problem.
If it matters, here's the code:
<?php // Connect to the database server mysql_connect("localhost", "xxxxx", "xxxxx") or die(mysql_error()); // Open to the database mysql_select_db("annarbo1_Archive") or die(mysql_error()); // Select all records from the "Individual" table $result = mysql_query("SELECT * FROM Archive ORDER BY date DESC") or die(mysql_error()); session_start(); $user = $_SESSION['valid_user']; ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>ANN ARBOR UNCOVERED - your informational destination</title> <link href="Level2_Verdana_Forms.css" rel="stylesheet" type="text/css" /> <script src="hideorshow.js" type="text/javascript"> </script> </head> <body> <div align="center"> <div id="black"><div id="centerer"> <table id="slogantopnav"><tr><td id="valign"> <div id="menu"> <div id="links"> <a href="index.php" class="link"> HOME</a> <a href="#" class="link"> ANN ARBOR</a> <a href="#" class="link"> ABOUT</a> <a href="#" class="link"> LINKS</a> <a href="#" class="link"> CONTACT</a><br/> <a href="restaurants.php" class="link"> RESTAURANTS</a> <a href="clubs.php" class="link"> CLUBS</a> <a href="#" class="link"> SHOPS</a> <a href="#" class="link"> STUDENT MAGAZINES</a> </div> </div> </td><td id="login"> <? if (!isset($_SESSION["valid_user"])) { echo' <form action="login.php" method="post"> <table cellspacing="0"> <tr><td><input type="text" name="username"width="300" value="username"/></td></tr> <tr><td><input type="password" name="password"width="300" value="password"/></td></tr> <tr><td><input type="submit" value="login"/></td></tr> </table> </form>'; } else { echo"Welcome ".$user; echo "<br> <a href='logout.php' class='link' >logout</a>"; } ?> </td></tr></table> </div> </div> <table id="top" cellspacing="0"> <tr height="110"><td id="landscape"><a href="index.php"><img id="img" src="header.png" /></a></td></tr> </table> <table width="900" id="main" cellspacing="0"> <tr> <td height="212"> <div id="scroll"> <table id="table" cellspacing="0"> <? while($row=mysql_fetch_array($result)){ $content = "hi".$row['title']; $file_name= $row['title'].".php"; $fp = fopen ($file_name, "w"); fwrite ($fp, $content); fclose ($fp); echo' <tr> <td height="20" class="title">'.$row['title'].'</td><td class="title"><div align="right">'.$row['date'].' </div> </td> </tr> <tr> <td height="100" colspan="2" class="content">'.$row['content'].' </td> </tr> <tr><td> <a href="'.$file_name.'" class="link">[comments]</a> </td></tr>'; } ?> </table> </div> </td><td rowspan="2"id="sideadvert"></td> <tr> <td height="37" colspan="2"><div id="copyright" align="center">© Copyright Ittai Svidler 2009</div></td> </tr><tr><td id="footer" colspan="2"></td></tr> </table> </div> </body> </html>
link in table help needed
in HTML Help
Posted
Simplest way would be:
You see, when you did:
the quotes in the html you want to print cut off the echo function, meaning that the URL "http://dracolas.comli.com/clan/profile.php?username=$username" is going to be cut off, which is a big syntax error.