I started getting my pages the way I wanted them to look last weekend, and got pretty far in what im trying to achieve basically, but I have a text issue now.
The text that I am putting into the db and the echo'ed text are running off the page and not staying in the table like I wanted. I tried many different ways of fixing it including using css to try and control it and using the table size to control it..
What should i add to my pages to fix the issue? and most importantly should I do it when I write it to the db (if possible) or should I do it when I print it out on the website.. here is what it is doing on the view page
http://www.elitegamers.us/Database_Test/view.php?id=27
here is the page that I am using to call the text from im sure you remember the pages pretty well since you helped me with the issues on the view page.
http://www.elitegamers.us/Database_Test/admin.php
feel free to add test items to the db and see how it reacts
The Code for the View.php
Expand|Select|Wrap|Line Numbers
- <link rel="stylesheet" href="list.css" type="text/css"><center>
- <?php
- $id = (int) $_GET['id'];
- // change the username and password
- $db = mysql_connect("localhost", "User Name", "password");
- // change the db name
- mysql_select_db("test_db",$db);
- $result = mysql_query("SELECT * FROM items WHERE id=$id",$db);
- $row = mysql_fetch_array($result);
- $wrappedtext = wordwrap;
- // make these any rows in the table that you want to show
- echo " <table border='1'>
- <tr>
- <th><h2>".$row["item_name"];
- echo "
- <tr>
- <td>
- </td></tr>
- <tr>
- <td>Location Found: ".$row["item_loc"];
- echo "</td></tr>
- <tr>
- <td>Properties: ".$row["prop"];
- echo "</td></tr>
- <tr>
- <td>Description: ".$row["description"];
- echo "</td></tr>
- <tr>
- <td><br>
- <br></td></tr>
- <tr>
- <td height='30'><br></td></tr></table>";
- ?>
- </center>
Let me know whats up and thanks again.
Laz