Jump to content

!!!!!

Members
  • Posts

    68
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

!!!!!'s Achievements

Member

Member (2/5)

0

Reputation

  1. I don't know. I've just never thought of a way to make a site like that without them...
  2. Okay, I have been trying to figure this out forever, and I finally decided to ask a question about it. I have seen many web pages that look like they are using frames, but every page I go to on that website has a different source, which lead me to believe they were not using frames. Could you tell me if this website uses frames? Go to tip.it (Gonna have to copy that into address bar ) Whenever I have tried to make my website with frames, and when the visitor clicks on a link on the menu frame, and the other frame goes to the page the visitor is trying to go to, the source stays the same. Always. Sorry if that's confusing. So, what I want to know is if these people are using some weird sort of frame I can't seem to get, or if they are doing something else. Thanks!
  3. Okay, I just made an Upload page on my website and I want it to only work on my IP Address... How do I do that?
  4. Okay, one more question... How do I restrict this Webpage to my IP address?
  5. The 777 got away the errors... but I still don't see the file in the folder I made the PHP code move it into. EDIT: Woohoo, thanks
  6. =\ <?php if (($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/pjpeg") && ($_FILES["file"]["size"] < 1000000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } } } else { echo "Invalid file"; } ?> and <html> <body> <form action="uploader.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input type="file" name="file" id="file" /> <br /> <input type="submit" name="submit" value="Submit" /> </form> </body> </html> I still get almost the exact same thing. This time, under the errors, it says it worked. But then when I go into the file where I tried to move it, it's not there. Errors: Warning: move_uploaded_file(upload/Untitled-2.gif): failed to open stream: Permission denied in /home/neomoonc/public_html/uploader.php on line 24 Warning: move_uploaded_file(): Unable to move '/var/tmp/phpHD4qlo' to 'upload/Untitled-2.gif' in /home/neomoonc/public_html/uploader.php on line 24 Stored in: upload/Untitled-2.gif
  7. Okay, I am making an Upload form on my website for my use. I'm gonna have the page password-protected so that nobody but me or my friends can upload. I would like to know what's wrong with these: <form enctype="multipart/form-data" action="uploader.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000" /> Choose a file to upload: <input name="uploadedfile" type="file" device="any" accept="image" /><br /> <input type="submit" value="Upload File" /> </form> and <?php $target_path = "uploads/"; $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 "There was an error uploading the file, please try again!"; } ?> I would also like to know how I can limit the extensions to what people can upload. Thanks! EDIT: I get these errors: Warning: move_uploaded_file(uploads/Untitled-1.gif): failed to open stream: Permission denied in /home/neomoonc/public_html/uploader.php on line 6 Warning: move_uploaded_file(): Unable to move '/var/tmp/phpHD4qlo' to 'uploads/Untitled-1.gif' in /home/neomoonc/public_html/uploader.php on line 6 There was an error uploading the file, please try again!
  8. Night all Goodnight. Okay lol... New Problem... I figured why not try making a reply system. So, I edited just a little bit... Here's my new 2 things: (By the way, if you want to see the error for yourself go here: www.neo-moon.com/input.php ) <?php if (isset($_POST['submit'])) { $host = "localhost"; $user = "--edited--"; $pass = "--edited--"; $con = mysql_connect($host,$user,$pass)ordie('Could not connect: '. mysql_error()) ; mysql_select_db("neomoonc_main",$con);// put the proper name of your db?Huh //this may work but y need to create table over and over again mysql_query("INSERT INTO reply (reply) VALUES ('".$_POST['reply']."')"); $query=mysql_query("SELECT * FROM reply");//person or people while ($fetch=mysql_fetch_assoc($query)) { echo $fetch['reply'].' '; } mysql_close($con); } ?> and for the HTML: <Html> <head> <title>MySQL Test</title> </heaD> <body> <form name="input" action="mysql.php" method="post"> Reply (Max length = 255):<br> <input type="text" name="reply" maxlength="255"><br> <input type="submit" value="submit"> </form> </body> </html>
  9. Hmm... Okay, but I wanted to make a 'reply' system for suggestions from people and I was going to use MySQL to do it. Each field being a reply. I know it's a little risky giving them power lol, but I'll make something to delete some replies. I'll still be able to let people reply with PHP right? All I should do with PHPMyAdmin is make the tables? Then I can add fields through PHP easily? EDIT: Thanks for the help, see ya.
  10. Ya, I changed the last comma after 'age' to a semicolon, but I still get Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/neomoonc/public_html/mysql.php on line 26
  11. It just won't add the table... And when I added that snippet of code you gave me to read all the fields from the table, it gave me the error at the top of my last post. One second, I'll try that "," instead of ";"... EDIT: With the "," instead of ";" I still get the same error, but I guess that really doesn't relate to the fetch method.
  12. Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/neomoonc/public_html/mysql.php on line 26 Also, I added these things together: <Html> <head> <title>MySQL Test</title> </heaD> <body> <form name="input" action="mysql.php" method="post"> <input type="text" name="firstname"><br> <input type="text" name="lastname"><br> <input type="text" name="age"><br> <input type="submit" value="submit"> </form> </body> </html> and <html> <body> <?php $host = "localhost"; $user = "--edited--"; $pass = "--edited--"; $con = mysql_connect($host,$user,$pass); if(!$con) { die('Could not connect: '. mysql_error()); } mysql_select_db("neomoonc?p?bb1",$con); $sql = "CREATE TABLE person ( firstname varchar(25); lastname varchar(25); age int; )"; mysql_query("INSERT INTO person (firstname,lastname,age) VALUES ('".$_POST[firstname]."', '".$_POST[lastname]."', '".$_POST[age]."')"); ?> <?php $query=mysql_query("SELECT * FROM people"); while ($fetch=mysql_fetch_assoc($query)) { echo $fetch['firstname'].' '.$fetch['lastname'].' is '.$fetch['age'].'<br />'; } ?> <?php mysql_close($con); ?> </body> </html> And they won't add any tables or fields.
  13. Ya, , forgot about editing that out. I got no errors with that, but I sorta forget how to show stuff in a table. Could you give me a snippet of code to show the stuff in that table please?
  14. It says I'm connected at --edited--@localhost, I put that port in the port spot in my code, and it's still not working. I made sure with the right username and everything.
  15. In my database section (note i'm not using the same thing as you), it has options: either A. Setup or B. Admin. Admin takes me directly to PHPMyAdmin, and Setup let's me add databases. All my databases for some reason have to start with "neomoonc_"... Also let's me add users. Oh lol, so users let's me add users so I can access the database? <html> <body> <?php $host = "localhost"; $user = "--edited--"; $pass = "--edited--"; $con = mysql_connect($host,$user,$pass); if(!$con) { die('Could not connect: '. mysql_error()); } mysql_select_db("neomoonc_p_bb1",$con); $sql = "CREATE TABLE person ( firstname varchar(25); lastname varchar(25); age int; )"; mysql_query("INSERT INTO person(firstname,lastname,age) VALUES('$_POST[firstname]', '$_POST[lastname]', '$_POST[age]')); mysql_query($sql,$con); mysql_close($con);?> </body> </html> Mmm says there's an error on like 26...
×
×
  • 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.