Jump to content

typomaniac

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by typomaniac

  1. Seriously, you should give thought to learning a server-side language. Don't be intimidated by it. It might seem a bit uncomfortable at first but once concept starts to fall in place the rest is history. Don't expect to understand everything overnight because it probably won't happen. Don't be afraid to ask questions--the dumbest question is the one that isn't asked and besides, that's what places like this are for. If it weren't for forums I'd be lost. PHP would probably be the easiest for openers and believe me, alot can/has been done with php.
  2. It depends on what you're processing it with, but you can put a limit as to how much text (how many characters) a person can enter. Inside a table it will always start a new row when you reach the end of one. In a table your text is usually vertically aligned to the center by default so you need to set everything to align to the top of the cells to keep things looking neat. CSS is the way to go for that one. Another thing you might want to remember when using tables is that search engines don't like to search them which is why everybody uses CSS layouts.
  3. Go with a simple <input type="radio"value="xxx" checked> That's what I do if I want a default pre-checked. Just a simple word-without quotes.
  4. Another thing you could do is use a table sized to your needs and then with css you could even use alternating colors for each row. Another option is to simply build your menu using <div> tags. It all depends on what your looking for. I spotted a neat one using j-query that is super simple to set up at http://papermashup.com/demos/jquery-tabs/ .
  5. Hi, I'm Dave. I like working with perl and just starting with php/mysql. I've used mysql with perl and not much difference(tricky no matter how you look at it, lol). I use css with everything and since the only way I know how to use javascript other than copy and paste and modify settings so I usually go with server side validations with css effects. My thing is Christianity. I love the Word and our web site(though a couple years needing an update) is www.praisenpray.com Have a great Christmas everybody.
  6. Hi, I'm typomaniac---the fact that people make mistakes is how I got the name. I worked hard for that name.
  7. Thank you sir, that worked like a charm. It took a little bit of finangling the statement to get it to do the proper results but then it hit. Tested with other $var numbers to verify and all check-go. I went with: $var=111111111; $result223 = mysql_query ("SELECT branches.branch_name, branches.bid as branchid,branch.bid as braid ,branch.cid FROM branches LEFT JOIN branch ON branches.bid=branch.bid and cid=$var order by branches.bid") or die(mysql_error()); echo"<br><br><table border='2px'>"; while($row223 = mysql_fetch_array( $result223 )) { $x223=$row223['branch_name']; $x223a=$row223['branchid']; $x223b=$row223['cid']; $x223c=$row223['braid']; echo"<tr><td>"; echo"<input type='checkbox'name='branch[]'value='$x223a'";if($x223b==$var){echo"checked";}echo"> $x223"; } Now, to study it and figure out what's happening there and continue the project. Hopefully I can figure the rest out. Thanx a million
  8. I have 2 tables, one named branch, and one named branches, each with two columns. Structure is: | branch | branches | |======================|==================================| | cid int(9) | bid tinyint(2) | bid tinyint(2) | branch_name varchar(25) | |-----------------+-----------------+-----------------+-----------------------------------| | 111111111 | 3 | 1 | U.S. Army | |-----------------+-----------------+-----------------+-----------------------------------| | 222222222 | 1 | 2 | U.S. Air Force | |-----------------+-----------------+-----------------+-----------------------------------| | 333333333 | 6 | 3 | U.S. Marine Corps | |-----------------+-----------------+-----------------+-----------------------------------| | 444444444 | 2 | 4 | U.S. Navy | |-----------------+-----------------+-----------------+-----------------------------------| | 555555555 | 4 | 5 | U.S. Coast Guard | |-----------------+-----------------+-----------------+-----------------------------------| | 666666666 | 5 | 6 | Merchant Marines | +----------------+-----------------+-----------------+-----------------------------------+ The branch table stores the branch(es) veterens served in: branch.cid: a client id number (unique--the one to match up with $var[a fictitious id]). branch.bid: the number to reference the individual branches listed in the branches table The branches table holds the name of the service and an id for each one. branches.bid: an id for branch_name branches.branch_name: Branches of the military This is for the purpose of editing an individual's profile. What I'm trying to do is produce the list of checkboxes using the database with bid as the value from the branches table which gives me a checkbox listing for everybranch which is followed by branch_name. Getting this far is no problem but when I try to add the checks to the boxes. I'm either getting only a checkbox for the ones from previous input or they're all checked or I'm getting a list a mile long. I could write the checkboxes out one by one but the format is used for other details of the profile and sometimes new listings(such as those in the branches column) are added via a different script(which is already working) and the person filling out the form has no way of controlling what is in . The script that has me spinning in circles is as follows: $var=222222222; //$var is a user input to match up against cid column in branch table $result223 = mysql_query ("SELECT branches.branch_name, branches.bid as branchid,branch.bid, branch.cid FROM branches INNER JOIN branch ON branches.bid = branch.bid where branch.cid=$var ") or die(mysql_error()); echo"<br><br><table border='2px'>"; while($row223 = mysql_fetch_array( $result223 )) { $x223=$row223['branch_name']; $x223a=$row223['branchid']; $x223b=$row223['cid']; $x223c=$row223['bid']; echo"<tr><td>"; echo"<input type='checkbox'name='branch[]'value='$x223a'";if($x223b==$var){echo"checked";}echo"> $x223"; } I used 'group by branchid' and it showed a box for each branch which is what I'm wanting but it only uses the amount of listings from branch as is in the branches table and there are many entries in the branch table and if the $var entry was past the first six entries it didn't appear as checked. I removed group by and replaced it with 'where branch.cid=$var' and it would only show one checkbox per entry using that number. What am I doing wrong and what can I do to fix this? I need to display all from the branches table checked accordingly to the branch table. It is for doing updates. Please let me know if anything needs explained. This is my first run with php and it has me stumped.
  9. css is a way you could do this, in your css sheet add something like .ghost{display:none;} and then in your html just add: <span class="ghost"><li class="leaf active-trail active"><a href="/?q=node/72" class="active-trail active">Plan an Event</a></li></span> Just make sure your span tag calls the class and don't forget to close the span</span> or everything will disappear.
  10. Is it possible for you to use php or perl to process your form? You could have immediate validation with javascript backed up with a server-side validation(more reliable and hack-proof plus you can "cleanse" the input before it hits the air).
  11. All you have to do to adjust cell size is manipulate the <td width="???"%>(replace ? with a number) Work your way across until you have reached 100%. Thing you will have to watch is if you get into another row with different cell sizes be sure to use <td wdth="00%"colspan="2"> , that is, however many columns it crosses borders, like, if you had <tr><td width="100%" colspan="3"></td></tr> <tr><td width="50%"></td><td width="20%"></td><td width="30%"></td></tr> If you're populating the cells from a database, tables are great but for design, remember that search engines don't get along with them to great. Also, I don't understand your use of needing the ' to run in a data base.
  12. How do you respond to questions posted by others. I see it says I am not allowed to reply.

×
×
  • Create New...