Jump to content

hostfreak

Members
  • Posts

    581
  • Joined

  • Last visited

    Never

Everything posted by hostfreak

  1. After playing around I came up with a solution that works the way I want: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <title>Test</title> <style type="text/css"> fieldset { border: solid 1px #d5d5d5; background-color: #e9e8e3; margin-top: 12px; } ol { list-style-type: none; } li { clear: both; } label { width: 80px; text-align: left; float: left; margin-top: -16px; } input[type=text] { float: left; font-family: Verdana,"Sans-serif"; size: 8pt; border: solid 1px #d5d5d5; margin: 6px 12px 20px -80px; } </style> </head> <body> <fieldset> <legend>General Information</legend> <ol> <li> <label for="firstName">First Name</label> <input id="firstName" name="firstName" type="text" /> <label for="lastName">Last Name</label> <input id="lastName" name="lastName" type="text" /> </li> <li> <label for="address">Address</label> <input id="address" name="address" type="text" /> </li> <li> <label for="state">State</label> <input id="state" name="state" type="text" /> <label for="city">City</label> <input id="city" name="city" type="text" /> <label for="zip">Zip</label> <input id="zip" name="zip" type="text" /> </li> </ol> </fieldset> </body> </html> Thanks for the help.
  2. It seems like you are using the GET post method. Instead use POST. Check this out: http://us3.php.net/manual/en/language.variables.external.php
  3. That just seems like too much work lol, I'm sure there has to be a simpler solution? I will have a lot of different forms generated by a form class and to have to make a css class for each input seems crazy. I appreciate your help.
  4. Hey saltedm8 thanks for the response. Yes, that does work however it doesn't quite line up the label to the top-left of the input. I know I can adjust the px, but would that mean every input would be required to be a certain width? It would also effect it depending on the amount of text: Say in my example, State was actually "State of the union". It would move City and Zip over significantly therefore not lining up. I try to avoid set px when possible. Not sure if there is any other way? Thanks again.
  5. I want to have something like: First Name Last Name |_______| |_______| Address |_______| State City Zip |_______| |_______| |_______| Here is what I have: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <title>Test</title> <style type="text/css"> fieldset { border: solid 1px #d5d5d5; background-color: #e9e8e3; margin-top: 12px; } ol { list-style-type: none; } li { display: block; } label { display: block; margin-top: 12px; } input[type=text] { font-family: Verdana,Sans-serif; size: 8pt; border: solid 1px #d5d5d5; } </style> </head> <body> <fieldset> <legend>General Information</legend> <ol> <li> <label for="firstName">First Name</label> <input id="firstName" name="firstName" type="text" /> <label for="lastName">Last Name</label> <input id="lastName" name="lastName" type="text" /> </li> <li> <label for="address">Address</label> <input id="address" name="address" type="text" /> </li> <li> <label for="state">State</label> <input id="state" name="state" type="text" /> <label for="city">City</label> <input id="city" name="city" type="text" /> <label for="zip">Zip</label> <input id="zip" name="zip" type="text" /> </li> </ol> </fieldset> </body> </html> It works for putting the label on top of the input, but not for displaying some next to each other. Any help is appreciated, thanks.
  6. It doesn't need to be done in javascript, unless your trying to achieve some sort of special effect. Check out: http://www.quirksmode.org/css/position.html and select "fixed" from the drop down to see an example.
  7. I think what your looking for is the CSS Position property, fixed. Take a look at it here: http://w3schools.com/css/css_positioning.asp
  8. Personally I would go the conditional route with different pages. To me it keeps it cleaner. Also, you should ask yourself whether or not the user actions will grow. If so, why not prepare for it now and give each different pages.
  9. That doesn't give us much to work with. If you want someone to do it for you, post in the freelance section. Otherwise you'll need to post some code pertaining to your menu and where you are stuck at.
  10. http://dev.mysql.com/doc/refman/5.0/en/select.html - take a look at the user comments (starting at the 2nd comment). There are a couple post concerning selection of random rows.
  11. Daniel0, I'm pretty sure I already suggested that. The only difference is the capitalization of the mysql statements; which I believe makes no difference?
  12. Are you sure all the spelling in your query is correct? Does table2 exist? Edit: Try: select table1.id as table1_id, table2.id as table2_id, field1, field2, field3 from table1, table2 where program_id=table2_id order by field3
  13. Maybe something like: select table1.id as table1_id, table2.id as table2_id, field1, field2, field3 from table1, table2 where program_id=table2.id order by field3 Then: $data1=$each_row['table1_id']; $data2=$each_row['table2_id']; Edit: On a side note, please tell me you edited your code down for simplicity of display. Otherwise, don't expect what you currently have to work at all.
  14. Try: <?php //sql //result $i = 1; while ($row= mysql_fetch_assoc($result)) { echo $i . ' ' . $row['column']; $i++; } ?> edit: which is basically doing what LordOrange said
  15. Sorry to bring this topic back up, however there is another question I would like to ask. I want to be able to group the errors under what multidimensional array they fall under. So I would need to extract the name of the array, for example: [username] => Array //Only want to e I would need to extract "Username". All suggestions are appreciated, thanks.
  16. Any particular reason why you are using ASP style tags? It is always recommended to use the standard tags: http://www.php.net/manual/en/language.basic-syntax.php (See: Example 10.2. PHP Opening and Closing Tags)
  17. If the inc_functionspagecreation.php is included to index.php and home.php is included to index.php, home.php should have access to all the functions in inc_functionspagecreation.php If it is just printing it out as text then for some reason the php engine isn't parsing it; which is most likely do to a missing php tags <?php ?> (as PFMaBiSmAd suggested). However, without posting the relevant code(s), there is no way for us to tell. Right now were just poking around in the dark...
  18. I've created a form class and would like to extend it's capabilities to generating select boxes. I however am unsure how to pass the select box option values/names to the method and loop through them. Anyone done this before and have a solution? Or if someone can link me to an article/tutorial on it, that would be great. Thanks.
  19. Why not offer both? Generate the invoice via HTML/CSS for them to print and offer them the option to download it as .pdf format (or maybe even other formats as well).
  20. Not sure why that didn't cross my mind. Anyways works great and looks a lot better to me. Thanks mjdamato.
  21. I've got an array that produces the following: Array ( [username] => Array ( [0] => Username must be entered [1] => Username must be at least 6 characters ) [Password] => Array ( [0] => Password must be entered ) ) What would be the best way to sort through it. I know a method (see below), but would like opinions on what people think is the way to go. Method I am currently using: foreach ($this->errors as $errors) //$this->errors is the array { while (list($k, $v) = each ($errors)) { echo $v . '<br />'; } } To me it seems a little makeshift seeing as I don't actually need to list the key.
  22. Makes perfect sense now. Thanks for the clarification thus far guys. Only one more question and I think I'll be good. As far as the values needing to be surrounded by quotes in mysql as well, how come it will not give off an error if a value isn't surrounded by quotes?
  23. NOW() is a mysql function. Look into <a href="http://www.php.net/time">Time()</a> and <a href="http://www.php.net/date">Date()</a> Example: <?php $datetime = date('m-d-Y h:i:s', time()); echo $datetime; ?>
  24. Another thing that confuses me is that in php you can only parse a variable in double quotes unless you use the concatenation operator. However, if your doing a query (mysql_query) it will parse the variable surrounded by the single quotes. I am assuming it's only within the mysql_query function that php will parse the variable like this? Do to the fact that inside that function, the quotes will be irrelevant (being as they will then be parsed by mysql)?
×
×
  • 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.