PDA

View Full Version : Request form



:alexxTURNER
21-05-2007, 10:15 PM
I uploaded my request form and it turned out like this

http://www.musichabbo.net/requests.html

does anybody know why and how can I fix it?

Heinous
21-05-2007, 10:22 PM
<center><b></b>
<p><!--p require('connect.php');
require('functions.php');
if($_POST['submit']) {
$bname = mysql_real_escape_string($_POST['name']);
$btype = mysql_real_escape_string($_POST['type']);
$brequest = mysql_real_escape_string($_POST['request']);
$name = htmlentities($bname);
$type = htmlentities($btype);
$request = htmlentities($brequest);
$ipaddr = $_SERVER['REMOTE_ADDR'];
if ($bname==NULL|$brequest==NULL){
echo "<center><h1><b>All fields are required.</b></h1></center><p>";
}else{
$query = "INSERT INTO rp_request (name, type, request, ipaddr) VALUES('$name','$type','$request','$ipaddr')";
mysql_query($query) or die(mysql_error());
echo "<p><b>--Your Request Has Been Sent--</b><p>";
}
}
--></p>
<p><br>
<font face="Verdana" size="2"><strong>Type:</strong></font>&nbsp; <select name="type">
<option value="">Song Request</option>
<option value="">Shoutout</option>
<option value="">Competition</option>
<option value="">Joke</option>
<option value="">Other</option></select></p>
<p><b><font face="Verdana" size="2">Request:&nbsp; </font></b><br>

</p>
<form action="request.php" method="post"></form></center>
Ignoring the commented php in html, your problem lies at the bottom. You define the <form> starting tag before all inputs, etc, for that form. You're also missing a textarea tag.

Epanel
22-05-2007, 10:44 AM
What DJ Panel are u using first?

QuickScriptz
22-05-2007, 11:29 AM
INSERT INTO rp_request

He's using my DJ Panel.
To fix it un-comment the php.... instead of <!--php make is <?php

You cannot comment php using normal comment tags!!

chrisgocrazyH
26-05-2007, 03:27 AM
it got haxed..

Want to hide these adverts? Register an account for free!