Jump to content

Phatsta

New Members
  • Posts

    4
  • Joined

  • Last visited

Phatsta's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi everybody, I've stared at this code for 4 hours straight, trying different approaches but I can't figure out why I'm getting the space between the top and middle, like this: User input site Also, I'm wondering about another thing. When using forms, is it possible to use the same input name more than once? Like in the above site where I use several rows, but the info is going to the same tables (in the sql) row by row. This is so that the user can input several rows at once. Here's the code: <!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" lang="sv"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Intendo tidsregistrering</title> <style type="text/css" media="all"> <!-- @import url("http://www.falloutdata.se/intendo/images/css/template_css.css"); --> #apDiv1 { position:relative; left:65px; top:30px; width:874px; height:900px; z-index:8; text-align:left; } </style> </head> <body> <div class="paper_top"><img src="http://www.falloutdata.se/intendo/images/papertop.png" width="1004" /> </div> <div class="paper"> <div id="apDiv1"> <p><font size="+2"><b>Tidsregistrering</b></font></p> <p> </p> <table border=0 cellspacing=0 cellpadding=0 width=100% bordercolor='#0000ff' align="center"> <tr> <td width="75">Från datum</td> <td width="75">Till datum</td> <td width="47">Från kl</td> <td width="53">Till kl</td> <td width="45">Projekt</td> <td width="48">Kundnr</td> <td width="165">Kundnamn</td> <td width="164">Benämning</td> <td width="45">Prodnr</td> <td width="53">Frånvaro typ</td> <td width="49">Upplupet tim</td> <td width="55">Antal tim</td> </tr> </table> <?php $link = mysql_connect("localhost","falloutdata_se","sjUqTVH2"); mysql_select_db("falloutdata_se.visma"); if (isset($_POST['submit'])) { $frdat = $_POST['frdat']; $tilldat = $_POST['tilldat']; $frkl = $_POST['frkl']; $tillkl = $_POST['tillkl']; $projekt = $_POST['projekt']; $kundnr = $_POST['kundnr']; $kundnamn = $_POST['kundnamn']; $ben = $_POST['ben']; $prodnr = $_POST['prodnr']; $frvtyp = $_POST['frvtyp']; $upptim = $_POST['upptim']; $anttim = $_POST['anttim']; $sql = "INSERT INTO database (frdat, tilldat, frkl, tillkl, projekt, kundnr, kundnamn, ben, prodnr, frvtyp, upptim, anttim) VALUES ('$frdat', '$tilldat', '$frkl', '$tillkl', '$projekt', '$kundnr', '$ben', '$prodnr', '$frvtyp', '$upptim', '$anttim')"; $result = mysql_query($sql) or die(mysql_error()); } ?> <form name="input" method="post"> <table width=100% border=0 align="center" cellpadding=0 cellspacing=1> <tr> <td bordercolor="#000000" bgcolor="#FFFFFF"> <input type="textbox" name="frdat" size="7" style="border: 1px solid #000000"> <input type="text" name="tilldat" value="" size="7" border="1" style="border: 1px solid #000000"> <input type="text" name="frkl" value="" size="3" border="1" style="border: 1px solid #000000"> <input type="text" name="tillkl" value="" size="3" border="1" style="border: 1px solid #000000"> <input type="text" name="projekt" value="" size="2" border="1" style="border: 1px solid #000000"> <input type="text" name="kundnr" value="" size="3" border="1" style="border: 1px solid #000000"> <input name="kundnamn" type="text" value="" size="24" border="1" style="border: 1px solid #000000"> <input type="text" name="ben" value="" size="24" border="1" style="border: 1px solid #000000"> <input type="text" name="prodnr" value="" size="2" border="1" style="border: 1px solid #000000"> <input type="text" name="frvtyp" value="" size="3" border="1" style="border: 1px solid #000000"> <input type="text" name="upptim" value="" size="4" border="1" style="border: 1px solid #000000"> <input type="text" name="anttim" value="" size="3" border="1" style="border: 1px solid #000000"> </td> </tr> <tr> <td> <input name="Submit" type="Submit" class="button_td" value="Skicka"> </td> </tr> </table> </form> </div> </div> <div class="footer_bottom"> <img src="http://www.falloutdata.se/intendo/images/paperbottom.png" align="top" /> </div> </body> </html> I've shortened it as you can see. In the original I've copy/pasted the input fields so it looks the same. Thanks for your effort!
  2. Thanks for your input! I actually thought I was using html 4.01 doctype? I will try to read up on CSS though, didn't know about that so thanks a lot.
  3. Disregard the part about the background image, I managed to solve it by a simple valign The funny thing is that the menu will respond to valign too, but not to align. So I can get it in place vertically, but not horizontally. Wierd...
  4. Hey everyone! I'm new to this forum, my name is Daniel and I've been a html beginner for ages. I started out over 10 years ago but it's never been my strong side so I never really advanced anywhere But I will do what I can to contribute in any way I can! I have a problem with a site I'm trying to put together. You can clearly see the problem if you look at it here: http://www.falloutdata.se/Hallafors/ You'll have to excuse the design, it's really only temp pictures and text so far, I haven't got very far with it yet. As you can see the menu does not center. Also the background image at the top doesn't load at the top - unless you click the body - then it aligns where it's suppose to be, but that's something I haven't looked into yet. The menu however, I've tried what I could find on Google, like putting the menu inside a DIV tag, making the menu an include file and of course the obvious like C tags and things like that. But no matter what I do the menu won't move, so I've ran out of things to try. Any ideas? I'd be really grateful!
×
×
  • Create New...