Jump to content

phpnoobie9

Members
  • Posts

    92
  • Joined

  • Last visited

    Never

Everything posted by phpnoobie9

  1. Got it. I restarted the server just to see if it worked. Thanks for the help.
  2. It's the correct one. Tried just editing through the virtuozzo panel and uploading a new one. Still nothing changes.
  3. magic_quotes_gpc On On magic_quotes_runtime Off Off magic_quotes_sybase Off Off Saw this in my php.ini file turned it off from on: ; Magic quotes for incoming GET/POST/Cookie data. magic_quotes_gpc = Off Restarted apache. phpinfo still shows the same result.
  4. Just wondering if anyone has had this issue. I'm using tinymce and when I use an apostrophe I get something like it\'s.
  5. I was just wondering what sites have you experience with that charges the least percentage from the pay. I know rentacoder charges 15% from the final project.
  6. You'll need a login form...check it against the username and password...if it checks good...it redirects the user using header() to whateverpage.php all you have to do is set the session on the pages you want blocked from non members. Then create a logout.php and when logged in users click on that it kills the session so they're logged out. Guessing that's what you want
  7. I was just wondering if people can hack sites without any type of text inputs on the site. What if there were inputs but no calling to database?
  8. Change: $dbpass = 'x; to $dbpass = 'x';
  9. Take action="mailto:joelklabo@gmail.com" and replace it with whatever php file you have with your php code.
  10. I have a form that I can enter in an image url: form <form action="test.php" method="post"> Submit Image Url: <input type="text" name="image2" size="45" /> Submit Image Url 2: <br> <input type="text" name="image2" size="45" /> <input type="submit" name="preview" value="Preview" /> </form> When I submit the url the php code below checks for it..the below is wrapped up in a isset submit. This page get's the information from the form and replaces the str_replace IMAGE1 or IMAGE2 with what I entered from the url form. What I want is when the image url 1 or image url 2 is empty I want it to echo nothing else I want to echo the string replacement with the img src tag. Can't seem to get it to work. $imageempty = "";//If no url was entered $image1 = $_POST['image1'];//Get url from form $image1a = "<img src=\"$image1\" width=100 height=100 >";//Insert url into image tag //If image 1 input box empty if (!empty ($image1)) { //If not empty show this $replace = str_replace ("IMAGE1",$image1a,$replace); } else { //If empty show this $replace = str_replace ("IMAGE2",$imageempty,$replace); }
  11. Found out that I needed to add the absolute path instead of just the '/test/' Fixed that and now it's working. Thanks.
  12. I've chmod the test folder to 777 I'm on centos 5 with cpanel. Line 20: if (move_uploaded_file ($_FILES['thefile']['tmp_... "/test/{$_FILES['thefile'... Warning: move_uploaded_file(/test/... [function.move-uploaded-f... failed to open stream: No such file or directory in /home/testsite/public_htm... on line 20 Warning: move_uploaded_file() [function.move-uploaded-f... Unable to move '/tmp/php6fLecj' to '/test/1.gif' in /home/testsite/public_htm... on line 20
  13. I think it's the tmp file for the upload. My phpinfo shows no value for upload_tmp_dir. I went into phpini and unsemi coloned it and added a directory to it.... ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). upload_tmp_dir = /tmp/ Restarted apache and phpinfo still shows no value?
  14. This is only for my personal use and I only upload jpg.
  15. I used WAMP5 to test my files and everything was working fine. I then tested live and my file won't upload images. I have the image md5 and have the name sent to the database. I'm receiving the image name in the database, but the actual image is not uploading..it was uploading fine on WAMP5. The permissions on the image folders are set to 777 The actual image upload file is in my administrative folder. Image upload code: //Start image upload //Check for an image $newname = md5(time()*rand(1,99999).$_FILES['image']['name']); $newname2 = $newname.'.jpg'; if (move_uploaded_file ($_FILES['image']['tmp_name'], $_SERVER['DOCUMENT_ROOT'].'images/'.$newname2)) { echo '<p>Image uploaded</p>'; } else { echo '<p>Problem uploading image</p>'; } //End image upload The image upload form section: <form enctype="multipart/form-data" action="upload.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="307200" /> <input type="file" name="image" size="50" /> <input type="submit" name="submit" value="SUBMIT" /> </form>
  16. ..? All I'm trying to do is when a user enters http://imagehostdotcom/theirimage.jpg ...for php to take that and add the image tag around it so it'll look like this: <img src="http://imagehostdotcom/theirimage.jpg "> and then take that image tag with the url and replace my image comment.
  17. I have a form that a user can enter in a url for an image in an input and it'll replace <!--image--> $replace=str_replace("<!--image-->",$_POST['image'],$replace); When a user enters the url I want to be able to put that inside the <img src="theirurl"> then echo out <img src="theirurl">. I don't want to enter url and have it just replace <img src="<!--image-->"> just the image comment tag because I don't want to show a blank image if the url wasn't entered.
  18. It echos that and still shows the displays. If I enter the letter 'r' anything that has 'r' in it displays. I'm trying to limit it.
  19. The below code shows the form if it's empty. I'm trying to edit it to show an error if someone uses less than 3 characters. I tried replacing get with: $_GET['search'] < 3 Search is from http://www.insanevisions.com/article-193-PHP-Search-Tutorials.html Search Form <?php if ($ _GET['search'] == "") { ?> <form action="phpsearch.php" method="get"> <input type="text" name="search"><br> <input type="submit" value="Search"> </form> <?php } ?>
  20. I have a table that I insert my categories into. I then have a form that lists those categories in a drop down menu so I can enter my data according to the category and sent to a different table 'images'. It is then sent to the database with the category name saved in a field called 'category' in the images table. I got the following code to display the list of categories in my category table: //Get categories $categories = 'SELECT * FROM categories ORDER BY name ASC'; $catresults = mysql_query ($categories); $categoryname = 'SELECT category FROM templates WHERE (category=$categories)'; while($categorylist = mysql_fetch_array($catresults)) { ?> <a href="<?php echo URL_PATH ?>indextest.php?category=<?php echo $categoryname ?>"><?php echo $categoryname['category'].'<br />'; ?></a> <?php }*/ I want the list of categories in a link for example like: Beach pictures forest pictures water pictures car pictures... etc.. When I click on the link I want to be able to retrieve everything in the image table that has the category according to the above. How do I do that?
×
×
  • 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.