Hello,

I am having some problems with IE and Opera browsers not displaying all my form select boxes, for example:

Firefox (Working):

[img]http://img577.imageshack.us/img577/6810/firefoxk.png[/img]

Internet Explorer:

[img]http://img600.imageshack.us/img600/7190/72404597.png[/img]

My upload page:

<?php

session_start();

error_reporting(0);

require '../includes/functions.php';
require '../includes/mysql.php';
require '../theme.fol.php';

loggedinorreturn();

stdheader();

block_begin("Upload Torrent");

if(isset($_POST['submit']))
{

$target = "../files/";
$target = $target . basename( $_FILES['uploaded']['name']) ;

$ok=1;

$torrentname2 = $_POST['torrentname'];
$category = $_POST['cat'];
$subcat = $_POST['subcat'];
$quality = $_POST['quality'];
$language = $_POST['language'];
$description = $_POST['description'];

if(isset($_POST['anonymous']))
{
$anonymous = "1";
}else{
$anonymous = "0";
}

$addedon = time();

if($language=="")
{
printerror("Please select a torrent language");
$ok=0;
}

if($description=="")
{
printerror("Please enter a torrent description");
$ok=0;
}

$guser = mysql_query("SELECT * FROM users WHERE email = '".$_SESSION['email']."'") or die(mysql_error());
$nuser = mysql_num_rows($guser);

if($nuser=="0")
{
printerror("A user session was found but that user does not exist in our database. Please <a href='http://www.bit-byte.org/account/logout.php'>logout</a> then re-login to continue.");
$ok=0;
}else{
$ruser = mysql_fetch_assoc($guser);

if($anonymous=="0")
{

$uploader = $ruser['nickname'];

}else{

$uploader = "Anonymous";

}

$ok=1;

}

//This is our size condition
if ($uploaded_size > 3500000)
{
printerror("Sorry, the file you uploaded is too large.");
$ok=0;
}

//This is our limit file type condition
if ($uploaded_type =="text/php" || $uploaded_type =="image/gif" || $uploaded_type =="image/jpeg" || $uploaded_type =="image/pjpeg")
{
printerror("The uploaded file is not a .torrent file.");
$ok=0;
}

//Here we check that $ok was not set to 0 by an error

if ($ok==0)
{
printerror("Sorry, an error occurred while uploading your torrent. Please try again.");
unlink($target);
}else{
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) {

require_once '../includes/Torrent.php';

$torrent = new Torrent($target);

$announce = $torrent->announce();
$torrentname1 = $torrent->name(); 
$size = $torrent->size( 2 );
$infohash = $torrent->hash_info();

$torrent 		= torrent_info_file($target);
$tracker 		= strip_tags($torrent['announce']);
$tracker 		= strip_tags(str_replace('announce', 'scrape', $tracker));
$stats 			= torrent_scrape_url($tracker, $infohash);
$seeds 			= strip_tags($stats['seeds']);
$peers 			= strip_tags($stats['peers']);
$size 			= strip_tags($torrent['size']);

if($torrentname2=="")
{
$torrentname = $torrentname1;
}else{
$torrentname = $torrentname2;
}

rename($target, "../files/$infohash.torrent");

$ftorrent = mysql_query("SELECT * FROM torrents WHERE info_hash = '$infohash'") or die(mysql_error());
$ntorrent = mysql_num_rows($ftorrent);

if($ntorrent=="1")
{

printerror("Sorry, the torrent you are trying to upload already exists in the database. Please select another torrent");
unlink($target);

}else{

if($category=="")
{

printerror("Please enter a torrent category");

}else{

$addtorrent = mysql_query("INSERT INTO torrents(torrentname, info_hash, announce, uploader, category, subcat, quality, lang, description, size, addedon, seeds, peers) VALUES('$torrentname', '$infohash', '$announce', '$uploader', '$category', '$subcat', '$quality', '$language', '$description', '$size', '$addedon', '$seeds', '$peers')") or die(mysql_error());

if($addtorrent)
{
printsuccess("Thank you, your torrent was successfully added. Please allow up to 10 minutes for your torrent to show in our torrents list.");
}else{
printerror("Sorry, an error occurred while uploading your torrent. Please try again.");
unlink($target);
}
}
}
}else{
printerror("Sorry, an error occurred while uploading your torrent. Please try again.");
unlink($target);
}
}

}else{

@$cat=$_GET['cat']; // Use this line or below line if register_global is off
if(strlen($cat) > 0 and !is_numeric($cat)){ // to check if $cat is numeric data or not. 
echo "Data Error";
exit;
}

//@$cat=$HTTP_GET_VARS['cat']; // Use this line or above line if register_global is off

///////// Getting the data from Mysql table for first list box//////////
$quer2=mysql_query("SELECT DISTINCT catname,id FROM torrentcat order by id"); 
///////////// End of query for first list box////////////

/////// for second drop down list we will check if category is selected else we will display all the subcategory///// 
if(isset($cat) and strlen($cat) > 0){
$quer=mysql_query("SELECT DISTINCT subcatname,id FROM torrentsubcat where maincat=$cat order by id"); 
}else{$quer=mysql_query("SELECT DISTINCT subcatname,id FROM torrentsubcat order by id"); } 
////////// end of query for second subcategory drop down list box ///////////////////////////

/////// for third drop down list we will check if category is selected else we will display all the qualities///// 
if(isset($cat) and strlen($cat) > 0){
$quer3=mysql_query("SELECT DISTINCT quality,id,catid FROM torrentquality where catid=$cat order by id"); 
}else{$quer3=mysql_query("SELECT DISTINCT quality,id,catid FROM torrentquality order by id"); } 
////////// end of query for second subcategory drop down list box ///////////////////////////


print("Use the form below to upload a torrent to our site. Torrent uploads are instantly added to our database. Any tracker may be used on our website.<br /><br />Please ensure your torrent is not already uploaded and help keep our site clean. Any adult torrents/fakes/viruses will be deleted and action will be taken against offending users.<br /><br /><font color='red'>Torrent Announce URL: http://tracker.bit-byte.org/announce.php</font><br /><br />");

print("<form enctype='multipart/form-data' action='http://www.bit-byte.org/upload/index.php' method='POST' id='contactform'>
          <ol>
            <li>
              <label for='torrentname'>Torrent Name:</label>
              <input type='text' name='torrentname' />
            </li>
            <li>
              <label for='category'>Category:</label>
              <select name='cat' onchange=\"reload(this.form)\"><option value=''>Select One</option>");
while($noticia2 = mysql_fetch_array($quer2)) { 
if($noticia2['id']==@$cat){
print("<option selected value='".$noticia2[id]."'>".$noticia2[catname]."</option>");
}else{
print("<option value='".$noticia2[id]."'>".$noticia2[catname]."</option>");
}
}

print("       </li>

              <li>
		<label for='subcat'>Sub Category</label>
		<select name='subcat'><option value=''>Select One</option>");
$num = mysql_num_rows($quer);
if($num >0)
{
while($noticia = mysql_fetch_array($quer)) {
if(isset($cat) and strlen($cat) > 0){ 
print("<option value='".$noticia[id]."'>".$noticia[subcatname]."</option>");
}else{
}
}
}else{
print("<option disabled='disabled' value=''>None Available</option>");
}

print("       </li>

              <li>
		<label for='quality'>Quality</label>
		<select name='quality'><option value=''>Select One</option>");
$num3 = mysql_num_rows($quer3);
if($num3 >0)
{
while($noticia3 = mysql_fetch_array($quer3)) {
if(isset($cat) and strlen($cat) > 0){ 
print("<option value='".$noticia3[id]."'>".$noticia3[quality]."</option>");
}else{
}
}
}else{
print("<option disabled='disabled' value=''>None Available</option>");
}

print("       </li>");

print("            <li>
              <label for='language'>Language:</label>
              <select name='language'><option value=''>Select One</option>");
$glang = mysql_query("SELECT * FROM torrentlang");
$nlang = mysql_num_rows($glang);
if($nlang=="0")
{
print("<option value='none'>No Languages Available</option>");
}else{
while($rlang = mysql_fetch_assoc($glang))
{
print("<option value='".$rlang['id']."'>".$rlang['langname']."</option>");
}
}
print("</select>
            </li>
            <li>
              <label for='description'>Torrent Description</label>
              <textarea name='description' cols='50' rows='8'></textarea>
            </li>
            <li>
              <label for='torrentname'>Torrent File:</label>
              <input name='uploaded' type='file' />
            </li>
		<br /><br />
            <li>
              <label for='anonymous'></label>
              <input type='checkbox' name='anonymous' /> Upload torrent anonymously?
            </li>
            <br /><br />
            <li>
              <label for='submit'></label>
              <input type='submit' name='submit' value='Upload Torrent' />
              <div class='clr'></div>
            </li>
          </ol>
	</form><br /><br />");

}

block_end();

stdfooter();

?>

I am using the uniform jquery from http://pixelmatrixdesign.com/uniform/

Any help?

Thanks

I'm very sorry guys and so embarrassed lol, simply forgot to close the select tags ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.