Jump to content

designationlocutus

Members
  • Posts

    62
  • Joined

  • Last visited

    Never

Everything posted by designationlocutus

  1. Session would be useful if you wanted to maintain the image through several clicks. Start the session the way Daniel suggested (this must be done on every page that you use) and assign your session variable to the picture name. However to do it the way I suggested, you need to set the iframe src in your second example to produce the correct image. [code] SRC="image.php?picture1=image.jpg" [/code]
  2. You could send the name of your image as a url variable when the user clicks on the link, then use the url variable and assign it to picture.
  3. Try and add passive mode to your script and see if the result changes (place it after the ftp_login function) [code] <?php ftp_pasv($conn_id, true); ?> [/code]
  4. Uh you poor soul! Try converting them to .txt files. That should strip the files of all the Word formatting.
  5. Try it with your passwords and see what happens.
  6. Are you linking all of your tables together within the DELETE query? Please post your query contruct.
  7. Are your three IP's within the same network?
  8. The while as it is set will run until the end of the array. You need your if condition as the while condition to exit early. You will probably need OR in the condition to to check for end of array.
  9. Do you have a username and password set for the FTP server?
  10. Have a look here, might save you some time :) http://codex.wordpress.org/Combating_Comment_Spam/Denying_Access
  11. Check out some of the database connection tutorials on this site.
  12. Change your loop structure to a while loop. It waits for a specific condition before terminating the loop and gives you 0 or more pass throughs: [code] while (condition_is_true) {   // Do all this } [/code]
  13. If you're getting from a database, you could make use of LIMIT in your SQL. It allows you to set offset and return parameters (e.g. LIMIT 10, 10 would start 10 records in and get the 10 records) You could have a two constant somewhere in your PHP file that sets how much you want on a page. For example $offset could be how many pages in and $returned could be the pages returned. Then, use the constants on the LIMIT. You could also use these constants as a way of calculating how many pages you have by dividing your total records (your total pages) by the constant. A result of 10.3, for example, would indicate 9 pages of 10 records and 1 page of 3 records. If you want to change your pagination at any time, you simply change the constants and it is changed throughout your entire code!
  14. The search engines would go to the processing page just as a visitor would and be redirected in the same way. Remember it's all done server side and the search engines won't notice until the actual HTML has been created. The newly created URL will be the one that is indexed. :)
  15. Hmm how about a redirect? Each item in your database still does have its primary key. You generate your title the same way your HTML generator does based on what is returned from the primary key and simply redirect it. - link clicked - get id - retrieve record from db - use title or whatever used to create redirect e.g. title.html - redirect to title.html That way you wont have to go through all the description part of you database searching for old links :)
  16. When you add the story, there will have to be a selection box that selects your image when you upload it. But since you said that there will be one image to one story then the most obvious solution would be to upload your pic on the same page with your story. Once the form is processed  the story is added with the correct image id. INSERT INTO IMAGE get the last image id INSERT INTO STORY with the image id reference. Changing the image would be on the edit page of the above. Re-uploading an image would: - Delete the image on the server and from the database (DELETE FROM) - Replace it with the one you uploaded (UPDATE)
  17. No it's in the context of database tables, for example: [code] image ----- imageid imagetitle imagepath story ----- storyid storytitle imageid [/code] story.imageid is your reference to the image in your image table. You link them via SQL for example: [code] SELECT * FROM story, image WHERE story.imageid = image.imageid [/code] That will return the image and story data where both the the reference from the story table and the primary in the image table are the same. It links two tables while keeping them seperate.
  18. Ooh a brainteaser. Sounds like a dynamic on static problem. I'd suggest using event handling in Javascript to create your sequence of numbers. They would be dynamically created on the static page when a user checks the box and placed in a hidden or disabled field on the form. Then when the form is submitted, the clicking order is preserved.
  19. Hmm so for the process of validating small form data use ereg() and preg_match() for larger dataset. You know it might be a good convention to use ereg() with varchar fields and preg_match () for the larger blobs and text fields.
  20. Been a while since I've used classes, but I think you might need a constructor function in there so your class can be instantiated properly.
  21. I think it might be your quotes around 'user_id' after WHERE. It might be treating it as a string literal rather than a table field.
×
×
  • 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.