Jump to content

dare87

Members
  • Posts

    211
  • Joined

  • Last visited

    Never

Everything posted by dare87

  1. I am having a problem with my gradient in IE. I am not sure what I am doing wrong, but I'm sure it's an easy fix. The site is svmrestore.com Here is the code in questions. #header_wrapper { box-shadow:0 2px 3px #212121; -moz-box-shadow:0 2px 3px #212121; -webkit-box-shadow:0 2px 3px #212121; background-color:#e1dfdf; background:-moz-linear-gradient(top, #e1dfdf 0%, #bcb7b7 100%); background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #e1dfdf), color-stop(100%, #bcb7b7)); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr = '$color-1', endColorstr = '$color-2', GradientType = 0); font-family:"HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; font-size:14pt; font-weight:300; height:120px; position:relative; z-index:300; } Looks great in FF and Chrome. Looks blue in IE Thanks in advance for your help.
  2. He just said it didn't match when he echoed the password, I was just throwing out something that might help
  3. Are you doing any type of encryption? If you are then it would need to be something like this $query = "SELECT * FROM players WHERE username='$username' AND password=SHA('$password')";
  4. My stick forms are only working on textarea and not a text box. Please help me. <body> <div id="box"> <div id="header"> <div id="tlinks"> <?php include('includes/tlinks.php'); ?> </div> <?php include('includes/header.php'); ?> </div> <div id="main"> <div id="content"> <?php if (isset($_POST['submit'])) // The form has been submitted. { // Initialize the error array. $errors = array(); // Check for an zip. if (!empty($_REQUEST['category'])) $category = $_REQUEST['category']; else $errors[] = 'Please Select a Category'; // Check for a Date Title. if (!empty($_REQUEST['catother'])) $catother = $_REQUEST['catother']; // Check for a Date link. if (!empty($_REQUEST['name'])) $name = $_REQUEST['name']; // Check for an Address. if (!empty($_REQUEST['contactname'])) $contactname = $_REQUEST['contactname']; else $errors[] = 'Please the persons name that we can contact'; // Check for a City. if (!empty($_REQUEST['address'])) $address = $_REQUEST['address']; // Check for an state. if (!empty($_REQUEST['phone'])) $phone = $_REQUEST['phone']; else $errors[] = 'Please enter a phone number for your contact'; // Check for an zip. if (!empty($_REQUEST['phone2'])) $phone2 = $_REQUEST['phone2']; // Check for an zip. if (!empty($_REQUEST['title'])) $title = $_REQUEST['title']; // Check for an zip. if (!empty($_REQUEST['number'])) $number = $_REQUEST['number']; else $errors[] = 'Please how many people are involved.'; // Check for an zip. if (!empty($_REQUEST['music'])) $music = $_REQUEST['music']; // Check for an zip. if (!empty($_REQUEST['animals'])) $animals = $_REQUEST['animals']; // Check for an zip. if (!empty($_REQUEST['announce'])) $announce = $_REQUEST['announce']; // Check for an zip. if (!empty($_REQUEST['signed'])) $signed = $_REQUEST['signed']; else $errors[] = 'You must digitaly sign this document with your full name'; // If there are no errors, add the user to the database. if (empty($errors)) { // Connect to the databse. require_once ('../../ffdmysql_connect.php'); // Add the query. $query = "INSERT INTO parade SET category='$category', catother='$catother', name='$name', contactname='$contactname', address='$address', phone='$phone', phone2='$phone2', title='$title', number='$number', music='$music', animals='$animals', announce='$announce', signed='$signed', date_entered=NOW()"; // Run the query. $results = mysql_query($query); // If there are no errors. if ($results) echo '<b> - Thank you. You have been registered for the parade. Expect a phone call within a few days of this event.</b>'; else echo '<div class="error">An error occured. Please try again</div>'; } else foreach ($errors as $msg) echo '<div class="error" style="color:red;"> - ' . $msg . '</div><br><br>'; } ?> For Questions please us the <a href="contact.php">contact page</a>, or call Meggan (801) 870-0693 or Louise (801) 451-0953 @ Parks and Recreation www.farmington.utah.gov/specialevents<br><br> <form name="parade_reg" action="reg_parade.php" method="post"> <table align="center" width="100%" border="0" cellpadding="1" cellspacing="0"> <tr> <td class="title" colspan="2">Parade Registration Form</td> </tr> <tr> <td>Entery Category:<br> <select class="required" name="category"> <option value="" selected>Select One</option> <option value="Animal">Animal</option> <option value="Car">Car</option> <option value="Truck and Trailer">Truck and Trailer</option> <option value=Band"">Band</option> <option value="Float">Float</option> <option value="Other">Other</option> </select> <br><br> </td> </tr> <tr> <td>Please Specify Other:<br> <input type="text" name="catother" value"<?php echo $catother; ?>" size="20" maxlength="40"><br><br></td> </tr> <tr> <td>Group Name:<br> <input type="text" name="name" value"<?php echo $name; ?>" size="20" maxlength="40"><br><br></td> </tr> <tr> <td>Group Contact Name:<br> <input type="text" class="required" name="contactname" value"<?php echo $contactname; ?>" size="20" maxlength="40"><br><br></td> </tr> <tr> <td>Address:<br> <textarea name="address" rows="5" cols="50"><?php echo $address; ?></textarea><br><br></td> </tr> <tr> <td>Main Phone:<br> <input class="required" type="text" name="phone" value"<?php echo $phone; ?>" size="20" maxlength="15"><br><br></td> </tr> <tr> <td>Secondary Phone:<br> <input type="text" name="phone2" value"<?php echo $phone2; ?>" size="20" maxlength="15"><br><br></td> </tr> <tr> <td>Theme/Title:<br> <input type="text" name="title" value"<?php echo $title; ?>" size="20" maxlength="40"><br><br></td> </tr> <tr> <td>Number of Pertisapants:<br> <input class="required" type="text" name="number" value"<?php echo $number; ?>" size="20" maxlength="40"><br><br></td> </tr> <tr> <td>Will you have music, drums, etc.? Specify:<br> <textarea name="music" rows="5" cols="75"><?php echo $music; ?></textarea><br><br></td> </tr> <tr> <td>Will you have horses or other large animals? Specify:<br> <textarea name="animals" rows="5" cols="75"><?php echo $animals; ?></textarea><br><br></td> </tr> <tr> <td>How would you like the announcer to announce your entry?:<br> <textarea name="announce" rows="5" cols="75"><?php echo $announce; ?></textarea><br><br></td> </tr> <tr> <td>I digitaly sign and agree to and will follow (along with my group) all the<br> terms and conditions that Farmington City has set. (Type your First and Last Name)<br> <input class="required" type="text" name="signed" value"<?php echo $signed; ?>" size="20" maxlength="40"><br><br></td> </tr> <tr> <td><input type="submit" class="button" name="submit" value="Submit"><br><br></td> </tr> <tr> <td class="smallText">* Highlighted forms designate required fields.</td> </tr> <tr> <td class="smallText">**You will be notified a day or two prior to parade date for your entry position number<br> Parade participants shall <b>not</b> throw any item from the parade route into the crowd. This restriction was adopted to prevent persons, especially children from being injured by running in front of parade entrants. It is permissible to pass out items to spectators by having someone walk along the parade route next to the curb. Parade entrants understand that they are in the parade at their own risk and agree not to hold Farmington City responsible for accident or mishap.</td> </tr> </table> </form> </div> <div id="bottom"> <div id="blinks"> <?php include('includes/blinks.php'); ?> </div> <?php include('includes/bottom.php'); ?> </div> </div> </div> </body> You can see the working sample at nayliner.net/ffd/reg_parade.php
  5. I've been working on getting a form that will change a portion of the content of the page depending on what you select. I have it working if I just have it display text, but if I change it the whole thing stops working. Please Select the Registration form you would like to complete <form name="registration"> <select name="select" onChange="displaydesc(document.registration.select, theform, 'showform')"> <option selected value="">Select One</option> <option value="">Basketball Tournament</option> <option value="">Rock Band Tournament</option> <option value="">Foot Race</option> <option value="">Booths</option> </select> <br><br> <span id="showform" align="left" style="font:italic 13px Arial"></span> </form> <script type="text/javascript"> var theform=new Array() theform[0]="" theform[1]="<?php echo 'auxiliary/bball.php'; ?>" theform[2]="<?php echo 'auxiliary/rband.php'; ?>" theform[3]="<?php echo 'auxiliary/frace.php'; ?>" theform[4]="<?php echo 'auxiliary/booth.php'; ?>" function displaydesc(which, descriptionarray, container){ if (document.getElementById) document.getElementById(container).innerHTML=descriptionarray[which.selectedIndex] } displaydesc(document.registration.select, theform, 'showform') </script> I've tried changin echo to an include('page.php'), but it just kills it. Please help, I need this to work ASAP
  6. dare87

    height problem

    I am trying to get nayliner.net/bunkall to be 100% height of the page. I have set all the things to 100% height but it is still not working. Am I missing something? CSS /* ============================================================= HTML OBJECTS ============================================================= */ body { position:relative; margin: 0; height: 100%; background-image:url(../images/bg.jpg); background-repeat:repeat; } /* ============================================================ HEADER OPTIONS ============================================================ */ #box{ position: relative; width: 828px; min-height: 100%; top:0px; margin: 0 auto; color:#FFFFFF; } #box a:link { color: #000000; text-decoration: none; } #box a:visited { color: #000000; text-decoration: none; } #box a:hover { color: #000000; text-decoration: none; } #header{ position: absolute; width: 828px; top: 0px; left: 0px; } #links { height:10px; left: 40px; top: -36px; position:relative; } #links a:link { color: #FFFFFF; text-decoration: none; } #links a:visited { color: #FFFFFF; text-decoration: none; } #links a:hover { color: #FFFFFF; text-decoration: none; } #links ul { margin: 0; color:#FFFFFF; padding: 0; list-style: none; } #links li { display: inline; color:#FFFFFF; margin: 0; padding: 0; } #loggedin { position:absolute; top:0px; left:0px; } /* ============================================================= BODY OBJECTS ============================================================= */ #main { position: absolute; top: 136px; left: 0px; width: 828px; min-height: 100%; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background: url(../images/middle.png) repeat-y; } #content { width: 740px; min-height: 100%; padding-top:0px; padding-bottom:0px; padding-left:50px; padding-right:40px; } #content a:link { color: #FFFFFF; text-decoration:underline; font-weight: bold; } #content a:visited { color: #FFFFFF; text-decoration: none; font-weight: bold; } #content a:hover { color: #FFFFFF; text-decoration: underline; font-weight: bold; } #title { color: #faa634; font-size:16px; font-weight:bold; } #subtitle { color: #faa634; font-size:13px; font-weight:bold; } .smallText { font-size:9px; font-style:italic; } /* ============================================================= PHOTOGALLERY OBJECTS ============================================================= */ .ptitle { font-size: 13px; font-weight: bold; color: #FFFFFF; padding: 5px; border-bottom: 1px solid #FFFFFF; background-color: #3873b9; } .picCell { padding-top: 5px; padding-left: 10px; padding-right: 10px; padding-bottom: 5px; border: 0px solid #FFFFFF; } .iconPic { border: 1px solid #000000; } .iconPic a:link { border: 1px solid #000000; } .iconPic a:visited { border: 1px solid #FFFFFF; } .picCaption { font-size: 10px; padding-left: 10px; } .break { padding-bottom: 5px; } .innerContent { float: left; width: 99%; border-bottom: 1px solid #FFFFFF; } /* ============================================================= ABOUT PAGE ============================================================= */ .ipage1 { padding-top:5px; padding-left:25px; } /* ============================================================= ABOUT PAGE ============================================================= */ .apage1 { padding-top:5px; padding-left:25px; } /* ============================================================= SCHEDULING PAGE ============================================================= */ .spage1 { padding-top:5px; padding-left:25px; } /* ============================================================= LOCATION PAGE ============================================================= */ /* ============================================================= CONTACT PAGE ============================================================= */ .cpage1 { padding-top:5px; padding-left:25px; } .cpage2 { padding-left:25px; } /* ============================================================= FOOTER OBJECTS ============================================================= */ #bottom { color:#FFFFFF; position: relative; top:56px; font-size: 9px; padding-right:40px; padding-bottom: 20px; font-family: Verdana, Arial, Helvetica, sans-serif; text-align: center; background: url(../images/middle.png) repeat-y; } #bottom a:link { color: #FFFFFF; text-decoration: none; } #bottom a:visited { color: #FFFFFF; text-decoration: none; } #bottom a:hover { color: #DDDDDD; text-decoration: underline; } #bottom ul { margin: 0; padding: 0; list-style: none; } #bottom li { display: inline; margin: 0; padding: 0; } /* ============================================================= NEWS OBJECTS ============================================================= */ .newsTitle { font-size: 17px; color: #927215; font-weight: bold; padding-top: 7px; padding-bottom: 15px; } .newsArticle { word-spacing: 1px; padding-bottom: 5px; } .newsSig { font-size: 10px; border-top: 1px dashed #5b7aa4; padding-bottom: 10px; } /* ============================================================= FORM OBJECTS ============================================================= */ INPUT, TEXTAREA, SELECT { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; background-color: #000000; color:#000000; padding: 2px; border: solid 1px #000000; } INPUT.button { background-color: #bbbbbb; color: #000000; } INPUT.bold { background-color: #bbbbbb; font-weight: bold; } INPUT.italic { background-color: #bbbbbb; font-style: italic; } INPUT.underline { background-color: #bbbbbb; text-decoration: underline; } INPUT.required { background-color: #ffffff; } TEXTAREA.required { background-color: #ffffff; } SELECT.required { background-color: #ffffff; } INPUT.smallText { font-size: 10px; } OPTION { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; border: solid 1px #000000; } INPUT.radio { border: 0px; background-color: #2a2a2a; } INPUT.highlighted { border: 0px; background-color: #1e1e1e; } Page <?php // Include the PHP script that contains the session information. include('includes/session.php'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta name="Author" content="Daron Nay"> <meta name="KeyWords" content=""> <meta name="Description" content=""> <title>Welcome to Bunkall Orthodontics | David M. Bunkall, DDS</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="includes/base.css" rel="stylesheet" type="text/css"> <link href="includes/drop/dropdown.css" media="all" rel="stylesheet" type="text/css" /> <link href="includes/drop/bunkall/default.ultimate.css" media="all" rel="stylesheet" type="text/css" /> <!--[if IE]> <script type="text/javascript" src="includes/drop/js/jquery/jquery.js"></script> <script type="text/javascript" src="includes/drop/js/jquery/jquery.dropdown.js"></script> <![endif]--> <script type="text/javascript" src="includes/include.js"></script> </head> <body> <div id="box"> <div id="header"> <?php include('includes/header.php'); ?> </div> <div id="main"> <div id="links"> <?php include('includes/links.php'); ?> </div> <div id="content"> <strong><span style="color:#ff9900">W</span>elcome to Bunkall Orthodontics. We’re glad that you’ve found us. As the original orthodontic practice in Layton city, we are proud to continue the tradition of caring, personalized service that our patients have come to expect. We’ve also “spiced things up” with a little youthful innovation and enthusiasm. <br><br> <span style="color:#0064c8">A</span>t Bunkall Orthodontics you will find a friendly, comfortable environment where we know our patients’ names and take time to speak with our patients and parents. We feel that this is the only way to provide top-of-the-line orthodontic treatment. We expect great things from ourselves and we expect great things from our patients. The results?... beautiful smiles & happy faces.</strong> </div> <div id="bottom"> <?php include('includes/bottom.php'); ?> </div> </div> </div> </body> </html>
  7. Does anyone know how to fix a drop down menu going behind a different layer. It works in FF and Safari, but it doesn't in IE Thanks for the help. nayliner.net/bunkall
  8. I don't think I'm stupid, but maybe I am. I am working on a sit for a friend I am try to put a link on a page and it is not working in FireFox and Safari. It works in IE but nothing else. I can get it to work but as soon as I add a "too" many <br> tags, it stops working. Would this maybe be caused by some of my php code. I don't use much on this page other then some includes (maybe problems with code on other pages?) ? www.nayliner.net/bunkall/location.php get directions link Thanks
  9. sorry forgot to include the page it's on... http://nayliner.net/bunkall/location.php
  10. I don't think I'm stupid, but maybe I am. I am working on a sit for a friend I am try to put a link on a page and it is not working in FireFox and Safari. It works in IE but nothing else. I can get it to work but as soon as I add a "too" many <br> tags, it stops working. Please help me, this is bugging me so bad and I want to sleep but I can't till this works. www.nayliner.net/bunkall Thanks oh, it is the get directions link
  11. This is how I did it <form action="" method="get" onsubmit="this.action = '../' + this.elements['code'].value.toLowerCase() + '/'; return true;"> <input type="text" class="required" name="code" id="code" size="15"> <input type="submit" value="Go"> </form>
  12. Could you explain how it works please?
  13. on the main index page I am going to have a form input box where they can type a name. When they click submit it will take them to www.domain.com/WHATTHEYTYPED I just don't want them to know that it's simply a sub directory.
  14. could someone give me an example of what it would be in javascript. I've been looking around and can't find an example. Thanks
  15. what would you need to place in the htaccess file so that it showed www.domain.com and not www.domain.com/something.php ? I've looked at iframes, but don't want to use that solution. Is there another way to do it?
  16. I want to place a text box on a webpage so that you can place information in the box and then when you hit submit it will forward you to www.domainl.com/TEXTBOXINFO Is Javascript the best way to do that. Also I want to "hide" the url so that it doesn't look like the path has changed. I think that would be done in htaccess. I've been looking online and I can only find a iframe solution and I don't want that. Thanks for the help
  17. Did you not read the code? That is what it is right now. If you right click a view the page source you can see it. That is not my biggest concern. I don't want it to go to the google page that says ok=true/false
  18. I currently have a form in html, but I want it in php so the information is not in the source code. It all works and when you put in the name and number it will call. When you push the call button it goes to a google page that say "ok=true" or "ok=false". Is there a way to make it so that it just stays on the same page that the form is on? Here is the code. <form action="https://clients4.google.com/voice/embed/webButtonConnect" method="post"> <input type="hidden" name="buttonId" id="buttonId" value="000000000000000000" /> <input type="hidden" name="showCallerNumber" id="showCallerNumber" value="1" /> <p> <label>Name <input type="text" name="name" id="name" /> </label> </p> <p> <label>Number <input type="text" name="callerNumber" id="callerNumber" /> </label> </p> <p> <label> <input type="submit" name="button" id="button" value="Call Nayliner" /> </label> </p> </form> This current code will always produce false because I blanked the id value
  19. I'm trying to upload a mov file using the following form, but all the page seems to do is refresh. Any ideas? Thanks <?php if (isset($_POST['submit-upload'])) { // LET'S DO A LITTLE VALIDATION FOR THE FILE // THESE VARS ARE THE TEMP AND ORIGINAL NAME OF THE FILE $fileTemp = $_FILES['uploadedfile']['tmp_name']; $fileName = $_FILES['uploadedfile']['name']; // THIS ONE IS FOR THE TYPE OF FILE UPLOADED $fileType = $_FILES['uploadedfile']['type']; // IF THE TYPE ISN'T AUDIO/MPEG THEN... if ($fileType != "video/mov") { print("The file you tried to upload seems to be an .mp3 please try again."); } // RENAME THE FILE USING A TIME STAMP SO IT WILL NEVER BE THE SAME AND APPEND A RANDOM NUMBER $randomNumber = rand(1, 999999); $newFileName = time() . $randomNumber . ".mov3"; // Where the file is going to be placed $target_path = "video/$newFileName"; // IF THE COMMENT FIELD ISN'T EMPTY RECORD IT if (!empty($_POST['comment'])) { $comment = $_POST['comment']; } if (!empty($_POST['intext'])) { $intext = $_POST['intext']; } if(move_uploaded_file($fileTemp, $target_path)) { // REQUIRE THE DATABASE CONNECTION require_once('mysql_connect.php'); // INSERT THE DATA INTO MYSQL $query = "INSERT INTO video SET name='$fileName', comment='$comment', intext='$intext', newname='$newFileName'"; $results = @mysql_query($query); echo "The file <b>$fileName</b> has been uploaded<br>It was posted in the "; if ($intext=2) { echo "Private section<br><br>"; } else { echo "Public section<br><br>"; } } else { echo "There was an error uploading the file."; } } else { ?> <form enctype="multipart/form-data" action="video_upload.php" method="POST"> <table align="center" width="100%" border="0" cellpadding="1" cellspacing="0"> <tr> <td colspan="2"><b>Add Music</b></td> </tr> <tr> <td>File:</td> <td><!--<input type="hidden" name="MAX_FILE_SIZE" value="20000000" />--><input name="uploadedfile" class="required" type="file" /></td> </tr> <tr> <td>Display Name:</td> <td><input type="text" class="required" name="comment" id="focus" size="40" value="<?php echo $comment; ?>" maxlength="40"></td> </tr> <tr> <td>Public/Private:</td> <td><select class="required" name="intext"> <option value="">SELECT</option> <option value="2">Private</option> <option value="1">Public</option> </select></td> </tr> <tr> <td> </td> <td><input type="submit" class="button" name="submit-upload" value="Upload File" /></td> </tr> <tr> <td> </td> <td class="smallText">* Highlighted forms designate required fields.</td> </tr> </table> </form> <?php } ?>
  20. That worked great. Thanks sasa
  21. I know there's a way to do this but don't know how... I want to be able to pull all the data out in groups. example ART - FIRST LAST FIRST LAST BAND - FIRST LAST FIRST LAST FIRST LAST This is what I have right now. "tgroup" is the name of the groups. <?php // Connect to the database. require_once ('mysql_connect.php'); // Make the query. $query = "SELECT user_id, first_name, last_name FROM users WHERE webaccess='2' ORDER BY tgroup, last_name ASC"; // Run the query. $result = @mysql_query ($query); // If the query ran w/o error, print out the results. if ($result) { // Table header. echo '<h3><span style="color: #af410d;">Current Faculty</span></h3> <table>'; // Fetch and print all the records. while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo ' <tr> <td width="20px"></td> <td>- <a href="teacherpages.php?id=' . $row['user_id'] . '">' . $row['first_name'] . ' ' . $row['last_name'] . '</a><br></td> </tr>'; } // Close the table. echo '</table>'; // Free up the resources. mysql_free_result ($result); } else { // If the query did not run successfully, print out an error message. echo 'No Teachers in the system'; } // Close the database connection. mysql_close(); ?> Thanks for the help
  22. Ok, I've updated my code with what you have... <?php if (isset($_POST['submit-upload'])) { // LET'S DO A LITTLE VALIDATION FOR THE FILE // THESE VARS ARE THE TEMP AND ORIGINAL NAME OF THE FILE $fileTemp = $_FILES['uploadedfile']['tmp_name']; $fileName = $_FILES['uploadedfile']['name']; // THIS ONE IS FOR THE TYPE OF FILE UPLOADED .MP3 = audio/mpeg $fileType = $_FILES['uploadedfile']['type']; // IF THE TYPE ISN'T AUDIO/MPEG THEN... if ($fileType != "audio/mpeg") { print("The file you tried to upload doesn't seem to be an .mp3 please try again."); } // Where the file is going to be placed $target_path = "music/$fileName"; // IF THE COMMENT FIELD ISN'T EMPTY RECORD IT if (!empty($_POST['comment'])) { $comment = $_POST['comment']; } if (!empty($_POST['intext'])) { $intext = $_POST['intext']; } if(move_uploaded_file($fileTemp, $target_path)) { // REQUIRE THE DATABASE CONNECTION require_once('mysql_connect.php'); // INSERT THE DATA INTO MYSQL $query = "INSERT INTO music SET name='$fileName', comment='$comment', intext='$intext'"; $results = @mysql_query($query); echo "The file <b>$fileName</b> has been uploaded"; } else { echo "There was an error uploading the file."; } } else { ?> <form enctype="multipart/form-data" action="music_upload.php" method="POST"> <table align="center" width="100%" border="0" cellpadding="1" cellspacing="0"> <tr> <td colspan="2"><b>Add Music</b></td> </tr> <tr> <td>File:</td> <td><!--<input type="hidden" name="MAX_FILE_SIZE" value="20000000" />--><input name="uploadedfile" class="required" type="file" /></td> </tr> <tr> <td>Display Name:</td> <td><input type="text" class="required" name="comment" id="focus" size="40" value="<?php echo $comment; ?>" maxlength="40"></td> </tr> <tr> <td>Public/Private:</td> <td><select class="required" name="intext"> <option value="">SELECT</option> <option value="0">Private</option> <option value="1">Public</option> </select></td> </tr> <tr> <td> </td> <td><input type="submit" class="button" name="submit-upload" value="Upload File" /></td> </tr> <tr> <td> </td> <td class="smallText">* Highlighted forms designate required fields.</td> </tr> </table> </form> <?php } ?> I changed the php.ini to 20mb and it worked, the only problem is I'm moving hosts shortly... I hope I can change the php.ini there too. As for the rename. I use sessions. I want it renamed in can I happen to upload the same file twice, the reason being is that I change little things in each file, but I sometimes leave them as the same name. If I could change it to a number (Which is why I was thinking the id) and have each file that is uploaded be a different number. when it posted the information to the DB I want the newname, name when it was uploaded, and the display name... And the validation gives the error, but it still uploaded files with different extentions... any ideas. Thanks for your help thus far graham23s
  23. Ok, I've gotten a little further with what I am doing, but I'm still having some problems. 1. I can't get files over 1-2mb to upload 2. I need the file that's posted to be named the same thing or something similar to the id in the db here is what I have so far... <?php if (isset($_POST['submit-upload'])) { // DEBUG //print_r($_FILES); $fileTemp = $_FILES['uploadedfile']['tmp_name']; $fileName = $_FILES['uploadedfile']['name']; // Where the file is going to be placed $target_path = "music/$fileName"; if (!empty($_REQUEST['comment'])) $comment = $_REQUEST['comment']; if(move_uploaded_file($fileTemp, $target_path)) { require_once('mysql_connect.php'); $query = "INSERT INTO music SET name='$fileName', comment='$comment'"; $results = @mysql_query($query); echo "The file <b>$fileName</b> has been uploaded"; } else{ echo "There was an error uploading the file."; } } else { ?> <form enctype="multipart/form-data" action="music_upload.php" method="POST"> <table align="center" width="100%" border="0" cellpadding="1" cellspacing="0"> <tr> <td colspan="2"><b>Add Music</b></td> </tr> <tr> <td>File:</td> <td><input type="hidden" name="MAX_FILE_SIZE" value="20000000" /><input name="uploadedfile" class="required" type="file" /></td> </tr> <tr> <td>Display Name:</td> <td><input type="text" class="required" name="comment" id="focus" size="40" value="<?php echo $comment; ?>" maxlength="40"></td> </tr> <tr> <td> </td> <td><input type="submit" class="button" name="submit-upload" value="Upload File" /></td> </tr> <tr> <td> </td> <td class="smallText">* Highlighted forms designate required fields.</td> </tr> </table> </form> <?php } ?> Thanks for the help thus far... Table setup... id int(10) auto_increment, primary key comment varchar(50) name varchar(50) type varchar(50) size int(10)
  24. I'm trying to make a page so I can upload music compositions I've created. I'm new to php and I've toyed with things I've found online, but can't get anything to work. This is what I have so far <?php // Where the file is going to be placed $target_path = "music/"; /* Add the original filename to our target path. Result is "music/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); $_FILES['uploadedfile']['tmp_name']; $target_path = "music/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; } else{ echo ""; } ?> <form enctype="multipart/form-data" action="musicupload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="2500000000" /> Choose a file to upload: <input name="uploadedfile" type="file" /><br /> <input type="submit" value="Upload File" /> </form> The problem I'm having is that I need to have the data stored in a DB... such as the name, filetype, tmp name... I don't know how or where to add that. I would also like it to say if it didn't upload the file, but again, I don't know where or how. and lastly, what I have now doesn't upload the files that I have tried.. I need to be able to upload 6mb-16mb files. Thanks for your help
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.