Jump to content


  • Posts

  • Joined

  • Last visited


Everything posted by earl_dc10

  1. Im talking height, if one of the sections gets taller than the others (say 4 rows) and the others are only 2 rows, then the two smaller ones realign to be centered in the <td>. I guess what Im after, is there a way to make the top of a <td> stay where originally placed and not realign. if this isn't making sense, look at this table in a browser. [code] <table width="50%" border="1">    <tr>      <td width="30%">Section 1</td>      <td width="40%">Main Section, Main Section, Main Section, Main Section, Main Section</td>      <td width="30%">Section 3</td>    </tr> </table> [/code] notice how "section 1" and "section 3" are no longer at the top of their td, but are centered, how would I force them to stay at the top? Thanks!
  2. hey, this is really bothering me, I have a table system [code] <table> <tr>   <td>    <table>    </table>   </td>   <td>    <table>    </table>   </td> .... [/code] and whenever one of the sub tables gets bigger than the others, the others increase as well to maintain the rectangular shape of the main table, I don't want that and Im not sure how to do it. essentially I want the look of phpfreaks (for a visual), 1 "column" on either side and a main section in the middle. if this can't be done using tables, Im not bound to them, any method will do, I just figured tables would be the way to go. Thanks!
  3. hey, Im wondering if I can have more than one class for an element, I have links on my page which I want to have all the same attributes, but each one have a unique setting so to speak. simplified example: [code] td.1 {    background-color: black; } td.2 {    border-style: solid; } // and then <td class="1" class="2"></td> [/code]
  4. I figured it out, I just used a seperate table above the other one and aligned them together.
  5. hey, I've seen this done and I assumed they used CSS but wasn't sure how to do it. Im trying to have a table with text in it [code] <table>    <tr>      <td>Title</td>    </tr>    <tr>      <td>This will be the announcement</td>    </tr> </table> [/code] and instead of having the table be a rectangle 2 rows high and as long as the second <td>, is it possible for me to make the first <td> (Title) only as long as it's name, but still have the second it's original length? Thanks!
  6. as long as your server runs php and mysql, you won't need anything on your machine. In order to use MySQL, you'll need to get a username and password from your webhost and to get php and mysql on the site, you just upload to the server. Hope it helps!
  7. hey, thanks, wow, that was a simple answer.... oh well, I got a lot to learn about arrays, thanks again!
  8. hey, I've never had much contact with arrays up to this point, always found a different way, but this time, they caught up to me. Im trying to insert an array key ($x) and an array value ($result_select) for every time a while loop runs and then print_r the whole array (with all the $x's and $result_select's in their respective places). As I said I've never had much luck with arrays and there's probably a very simple answer to this, but hey, ya learn something new every day! Thanks -J
  9. yes, very easy, just do this: [code] $select = "SELECT * FROM $table"; $select_query = mysql_query($select, $link)    or die("Couldn't select <value".mysql_error() ); $num = mysql_num_rows($select_query) // get the number of rows $id = $num-1; // since mysql_num_rows starts at 1and id's start at 0 $rand = rand(0, $id); //random statement $get = "SELECT <value> FROM $table WHERE id='$rand'"; $get_query = mysql_query($get, $link)    or die("Couldn't select <value>".mysql_error() ); [/code]
  10. hey, do the txt files' names have anything in common with the name of the album? ie. same name, or variations of the name? along those lines? or are they completely random?
  11. also, please try this: change [code] $connection = mysql_connect( "$host","$user","$pass" ) or die(mysql_error()); [/code] to [code] $connection = mysql_connect( $host, $user, $pass ) or die(mysql_error()); [/code]
  12. try this : change [code] $query1="SELECT *  FROM `contacts` WHERE `company` LIKE '%' AND `upgrade1` = 'Y' ORDER BY `company` ASC"; [/code] to [code] $query1 = "SELECT * FROM 'contacts' WHERE 'company' LIKE '%' AND 'upgrade1' = 'Y' ORDER BY 'company', 'upgrade1' ASC"; [/code] your ORDER BY statement only said to order by company
  13. hi, welcome to PHP! along what willpower said, just look us over for a while, here are some additional resources you can go to if you want to find alot of information on one subject : The PHP manual (Documentation, left side of screen) The MYSQL manual (also under Documentation) www.php.net, they have a handy function lookup that has the syntax and examples These are the main ones I use, Im sure there are others Good Luck!
  14. hmmm... well, I can see that you forgot a ";" at the end of $link, that's about all I see though
  15. mysql_db_query has been depreciated, more info here: [a href=\"http://us2.php.net/manual/en/function.mysql-db-query.php\" target=\"_blank\"]http://us2.php.net/manual/en/function.mysql-db-query.php[/a] try this and see if it works [code] <?php $link = mysql_connect...... $db_select = mysql_select_db(<database name>, $link); $query = "SELECT image FROM $table WHERE username = '$usernameCookie'"; $result = mysql_query($query, $link)      or die("Couldn't select result".mysql_error() ); echo mysql_result($result, 0); ?> [/code]
  16. just remember to echo all the variables to make sure that there is something in them, that has saved me alot of time in the past
  17. hey this is a common mistake and easy to miss sometimes, but try changing [code] //the second (not working) to set the username value to a cookie for later comsumption. setcookie("mysite_username", "$username"); [/code] to [code] //the second (not working) to set the username value to a cookie for later comsumption. setcookie("mysite_username", $username); [/code] when used as values, variables do not use quotes more on cookies here: [a href=\"http://www.phpfreaks.com/phpmanual/page/function.setcookie.html\" target=\"_blank\"]http://www.phpfreaks.com/phpmanual/page/fu....setcookie.html[/a] Good luck!
  18. well, I couldn't decifer what you were trying to accomplish with this script (sorry), but this may be the problem, change [code] where Player=$current_player [/code] to [code] WHERE Player='$current_player' [/code] Im pretty sure the ' ' are necessary if that's not the problem, please post the error message you get hope that helps
  19. hi lightnb [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Where would that go? as part of the submit button? or on the next page? the form is on a .php page.[/quote] since your form page is on a .php page and (im assuming) your varification page is also .php, you can have it on either, I would probably do it on the form page myself, but that's just me. use empty() to see if the field is empty ereg() to see if they're all numbers !ereg() to make sure there are no numbers and as for the id number, you can use this (Im assuming you're entering these into a database) [code] $select = "SELECT <fieldname> FROM $table"; $select_query($select, $mysql_link)      or die("Couldn't select <fieldname>".mysql_error() ); $id = mysql_num_rows($select_query); [/code] you can use any field as long as there is any entry for every row and since id numbers start at 0, and mysql_num_rows starts at 1, you don't have to add one hope it helps
  20. [!--quoteo(post=349633:date=Feb 26 2006, 03:01 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Feb 26 2006, 03:01 PM) [snapback]349633[/snapback][/div][div class=\'quotemain\'][!--quotec--] [a href=\"http://www.essexracers.com/jh1/cars.php\" target=\"_blank\"]http://www.essexracers.com/jh1/cars.php[/a] heres the link i have problems with. as you see, when i dont put spaces in with the textbox, it makes the box go wider, how can i make that stay still and force it to a new line? [/quote] try the CSS max-width ex. [code] <style type="text/css"> td.width {           max-width: 40%;                } </style> [/code] not sure how well it works in IE, but looks good in the other browsers
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.