Jump to content

rog1121

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rog1121's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Edit: it seems that I set the limit of the Text length to 30 in the DB lol. Stupid me.... Sorry for the trouble
  2. This is what happens But its still not entering the full url in the DB
  3. I've Basically got this script and everything works. Except for the part that it doesen't insert "$_FILES['file']['name']" into the image_url. Any Ideas guys? <? include "includes/config.php"; if (isset($_POST['add'])) { if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png")) && ($_FILES["file"]["size"] < 20000)) { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { if (file_exists("images/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; echo $_FILES['file']['name']; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "images/" . $_FILES["file"]["name"]); } } } else { echo "Sorry, but only PNG, JPG, and GIF files are allowed."; } mysql_connect ($mysql_host, $mysql_user, $mysql_pass); mysql_select_db ($mysql_db); $image_url = "http://localhost/admin/images/". $_FILES['file']['name'] .""; $sql = "INSERT INTO test (title, link, description, image_url) VALUES ('$_POST[title]', '$_POST[link]', '$_POST[description]', '$image_url')"; if (!mysql_query($sql)) { die('Error: ' . mysql_error()); } header( 'Location: portfolio.php' ); mysql_close(); } ?> <form enctype="multipart/form-data" method="post"> <p> <strong>TITLE</strong><br/> <input type="text" name="title" class="box"/> </p> <p> <strong>LINK</strong><br/> <input type="text" name="link" class="box"/> </p> <p> <strong>IMAGE</strong><br/> <input type="file" class="box" name="file"/> </p> <p> <strong>DESCRIPTION</strong><br/> <input type="textarea" name="description" class="box"/> </p> <p> <input name="add" type="submit" id="submit" tabindex="5" class="com_btn" value="ADD WORK"/> </p> </form>
  4. I know a little bit of PHP I just needed some guidance actually doing it. Thanks for the reply though!
  5. I don't mind using PHP to do it. Just need help on this. Dont want to double post in PHP Section
  6. Its not for Google Calendar its for something else. The site I'm trying to use has no API.
  7. I was wondering if it was possible to desplay certain ares of a site with an iframe? For ex: instead of displaying this: It would display just this:
  8. OK I got it working with a different form and I'll fix the SQL Injection later. Thanks for the help guys!
  9. Well I have both an online form and since I sell software I would like to integrate this into the program. The software uses the URL method where it is visible
  10. Within echo use the single quote like this ' and not the Double quotes that look like this "
  11. I see, Is there anyway I could secure it and at the same time achieve the URL Submit?
  12. I have a Feedback form that I use to get peoples input. So far it works But I have 2 Problems Here is the Code: <?php include "includes/config.php"; $date = date('jS \of F h:i A'); $sql="INSERT INTO news (name, email, comments, date) VALUES ('$_POST[Name]', '$_POST[email]', '$_POST[comments]', '$date')"; header( 'Location: thanks.php' ); mysql_close($con) ?> I'm making a VB.net Feedback form and I want to imput like this http://mysite.com/feedback.php?name=Mike&[email protected]&comments=comment&date=20th of April 12:30 AM But so far from my testing it doesn't register the values and says that there is a Duplicate value for email ". I'd like it to register values somehow and if there is a duplicate email entered then have it update it or write over it. Any help appreciated, Thanks!
  13. Never mind got it to work!
  14. I have a Feedback form that I use to get peoples input. So far it works But I have 2 Problems Here is the Code: <?php include "includes/config.php"; $date = date('jS \of F h:i A'); $sql="INSERT INTO news (Name, Email, Comments, date) VALUES ('$_POST[gamertag]', '$_POST[email]', '$_POST[password]', '$date')"; header( 'Location: thanks.php' ); mysql_close($con) ?> I'm making a VB.net Feedback form and I want to imput like this http://mysite.com/feedback.php?name=Mike&[email protected]&comments=comment&date=20th of April 12:30 AM But so far from my testing it doesn't register the values and says that there is a Duplicate value for email ". I'd like it to register values somehow and if there is a duplicate email entered then have it update it or write over it. Any help appreciated, Thanks!
×
×
  • 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.