Jump to content

teynon

Members
  • Posts

    898
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by teynon

  1. Post it here: http://www.phpfreaks.com/forums/index.php?board=8.0 (PHP Freelancers)
  2. Once again, you need to post the rest of your code.
  3. I don't understand the point of you using an array as a function variable either. Post the rest of your code.
  4. Please read: http://php.net/manual/en/functions.arguments.php
  5. Hi. Syntax error give you reason for code not working.
  6. Honestly, given your last post, you should have someone else work on your PHP script. You have to submit the form for it to go through. This is PHP help, not PHP do it for you. You can probably get someone here to do it for like $10. Its an easy fix, but hard to explain. Not me, though. I'm at work.
  7. I wont make the code for you, but what you could do is this: split the code. Section 1, section 2. Then, count the number of html opening tags (<blah) using preg_match. Then, count the number of closing tags (>). If they are unequal. Then, find the last < start tag in section 1. Get the strpos to that tag and trim it off and put it on section 2. Then insert your image.
  8. LIMIT 1 in your sql query limits it to 1 every time.
  9. I didn't check the quotes for all of them. WebStyles is right about the ' and ". You should standardize your code and go with one or the other. FYI, \ is an escape character. That's why I like using { in quotes because it ensures your variable is a variable.
  10. $genre_string is not being set up properly. You need to verify that those variables are being sent. I would do print_r($_POST); and run some echo statements inside of the genre_string statement to see if its being executed or not.
  11. For variables that are in strings, enclose them in {} Like so: "dir/{$variable}"
  12. Holy code injection, Batman! That's ugly. You should validate all variables that can be set via post or get.
  13. uncomment this line: //echo "SELECT * FROM movie $genre_string ORDER BY RAND() LIMIT 0,1<br />"; and tell us what it says.
  14. The other two or right, need more information. But your script is showing the content because your substr's are erasing the <img src=" tag before an image. You're going to have to get more involved to either remove image tags, crop the text, then reinsert image tags, or just take images out altogether. My guess is you are trying to make a featured article type thing that only shows a portion of the whole listing. If that's the case, I would remove images altogether. You're getting into an area that becomes very complicated though, as you'll have to determine if any HTML tags are open or not. The easiest way is to pull all HTML tags out of the content using a regular expression.
  15. Your looking at a lot of logic going into pagination on this. You'd have to count how many of each you have and determine how many you want to show on each page. You can't just combine it because you are displaying each result differently. What I would do is implement an AJAX pagination individually for each section.
  16. What happens when you try to upload a video? Need more information. It is possible you have more than one issue here.
  17. $genre_string .= "Genree LIKE '%" . $genre[$i] . '%' . "'". " OR "; $genre_string1 .= $genre[$i] . " OR "; Change OR to AND. This is a logic issue.
  18. You are running out of memory for sure. 134217728 is 128 mb. Your script is most likely processing too much information. You either need to increase the memory limit, usually double it, or fix your program to use less. I would try 256 mb.
×
×
  • 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.