...

View Full Version : Mail Form in DB Code



Patrik Iden
11-13-2011, 02:31 PM
[SOLVED]
Hi i have this code that generates inputs from DB. Now i'm trying to instert a Mailform to the same page/code. The problem is that the mailform dont show up att the top field?
The code looks like this:


$query="SELECT * FROM jobadd ORDER BY Timestamp DESC LIMIT 6";

$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();


$i=0;
while ($i < $num) :
?>


<div class="blogitem" style="display: block;">
<div class="blogdivider"><img src="./images/devider.gif" width="100%" height="1px" border="0"><br></div>
&nbsp;<font face="Arial" color="#666666" style="font-size:10px"><?php echo mysql_result($result,$i,"ID"); ?>&nbsp;|&nbsp;&nbsp;</font>&nbsp;<font face="Arial" color="#666666" style="font-size:10px">Datum:
<?php echo mysql_result($result,$i,"Time_of_submission"); ?></font>
<br><div class="blogsubject">&nbsp;<?php echo mysql_result($result,$i,"Vad"); ?>&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo mysql_result($result,$i,"Var"); ?>
&nbsp;&nbsp;|&nbsp;&nbsp;<?php echo mysql_result($result,$i,"Postnr"); ?>&nbsp;&nbsp;|&nbsp;&nbsp;ID Kod: <?php echo mysql_result($result,$i,"Idkod"); ?></a><br></div>
<font face="Arial" color="#282828" style="font-size:13px"><br>

<div id="wb_Form1" style="position:absolute;left:250px;width:318px;height:348px;">
<form name="svarsform" method="post" action="<?php echo basename(__FILE__); ?>" enctype="multipart/form-data" id="Form1">
<div id="wb_Text1" style="margin:0;padding:0;position:absolute;left:10px;top:15px;width:46px;height:16px;text-align:left;z-index:29;">
<font style="font-size:13px" color="#282828" face="Arial"><b>Namn:</b></font></div>
<input type="text" id="Editbox1" class="CustomStyle" style="position:absolute;left:66px;top:15px;width:200px;height:24px;z-index:30" name="name" value="">
<div id="wb_Text2" style="margin:0;padding:0;position:absolute;left:10px;top:51px;width:46px;height:16px;text-align:left;z-index:31;">
<font style="font-size:13px" color="#282828" face="Arial"><b>Idkod:</b></font></div>
<input type="text" id="Editbox2" class="CustomStyle" style="position:absolute;left:66px;top:51px;width:200px;height:24px;z-index:32" name="Idkod" value="<?php echo mysql_result($result,$i,"Idkod"); ?>">
<div id="wb_Text3" style="margin:0;padding:0;position:absolute;left:10px;top:87px;width:56px;height:16px;text-align:left;z-index:33;">
<font style="font-size:13px" color="#282828" face="Arial"><b>Telefon:</b></font></div>
<input type="text" id="Editbox3" class="CustomStyle" style="position:absolute;left:66px;top:87px;width:200px;height:24px;z-index:34" name="phone" value="">
<div id="wb_Text4" style="margin:0;padding:0;position:absolute;left:10px;top:123px;width:46px;height:16px;text-align:left;z-index:35;">
<font style="font-size:13px" color="#282828" face="Arial"><b>Epost:</b></font></div>
<input type="text" id="Editbox4" class="CustomStyle" style="position:absolute;left:66px;top:123px;width:200px;height:24px;z-index:36" name="email" value="">
<input type="submit" id="Button1" name="" value="Svara" style="position:absolute;left:170px;top:163px;width:97px;height:33px;border:1px #FFFFFF solid;background-color:#19B2E9;color:#FFFFFF;font-family:Arial;font-size:13px;z-index:37">
</form>
</div>

<font face="Arial" color="#FF0000" style="font-size:12px"><b>&nbsp;Kontakt info:</b></font>
<br>
<b>&nbsp;Namn: </b><?php echo mysql_result($result,$i,"Namn"); ?>
<br>
<br>
<b>&nbsp;Epost: </b><?php echo mysql_result($result,$i,"Epost"); ?>
<br>
<br>
<b>&nbsp;Telefon: </b><?php echo mysql_result($result,$i,"Telefon"); ?>
<br>
<br>
<b>&nbsp;Mobil: </b><?php echo mysql_result($result,$i,"Mobil"); ?>
<br>
<br>
<font face="Arial" color="#FF0000" style="font-size:12px"><b>&nbsp;När skall Uppdraget börja:</b></font>
<br>
&nbsp;<?php echo mysql_result($result,$i,"När"); ?>
<br>
<br>
<font face="Arial" color="#FF0000" style="font-size:12px"><b>&nbsp;Uppdragets uppskattade pris:</b></font>
<br>
&nbsp;<?php echo mysql_result($result,$i,"Pris"); ?> kr
<br>
<br>
<font face="Arial" color="#FF0000" style="font-size:12px"><b>&nbsp;Beskrivning av uppdrag:</b></font>
<br>
&nbsp;<?php echo mysql_result($result,$i,"Beskrivning"); ?>
<br>
<br>
<div class="blogcomments">&nbsp;<a href="mailto:<?php echo mysql_result($result,$i,"epost"); ?>?subject=<?php echo mysql_result($result,$i,"Vad"); ?>&nbsp;-&nbsp;Svar på uppdragsförfrågan från Jobler.se">&nbsp;&nbsp;Svara på denna förfrågan:&nbsp;&nbsp;</a></div>
<br>


<?php
$i++;
endwhile;
?>

</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum