Jump to content

cunoodle2

Members
  • Posts

    602
  • Joined

  • Last visited

    Never

Everything posted by cunoodle2

  1. What is the error message you are getting?
  2. My guess is that this code is OUTSIDE of the "<?php" bracket.. "$start = ($page-1)*$per_page; $sql = "SELECT productId, productCode, image, name, price, stock_level FROM inventory WHERE productCode LIKE '%".$searchp."%' OR name LIKE '%".$searchp."%' AND Seller_ID = '" . $_SESSION['SESS_SELL_ID'] . "' order by name limit $start,$per_page"; $rsd = mysql_query($sql);"
  3. I wish I could press a "LIKE button" for Pikachu2000 responses.
  4. Create another include file and call it something like "includes.php" or "pagename.php" On every page where you would want to define this just "require_once includes.php;" have a variable in there called $site_name and set it based upon the URL of the current page. On every page just have "echo $site_name" and that will display what you are looking for.
  5. I'm betting you have an error in your html form. Since IE is so loose on errors it may be slipping through. I bet that "$id" is not even set or being passed in. You need to do better error checking too after you get your results from the query. Do this.. $getdata = mysql_query("SELECT * FROM motorola WHERE id=$id", $db); if (!$getdata) echo "There are no results else { $row = mysql_fetch_array($getdata); $title = $row["title"]; $price_1 = $row["price_1"]; $price_2 = $row["price_2"]; $price_3 = $row["price_3"]; $imageaddr = $row["imageaddr"]; $description = $row["description"]; $keywords = $row["keywords"]; $time = $row["time"]; }
  6. You are missing some code. Please show us the actual code at line #3 which is where php says the issue is.. "MySQL server version for the right syntax to use near 's','home')'" I'm guessing that you may have an older version of mysql or something. However, I would need to see your code to even begin troubleshooting this.
  7. From what I know that is a FILE encryption as apposed to a string. According to the manual it states "openssl_pkcs7_encrypt() takes the contents of the file named infile and encrypts them using an RC2 40-bit cipher" Can you give me a little more info on what you are trying to do? Maybe there is a better/different way to do what you are looking for. Are you also looking to be able to decrypt said string/file or is this 1 way (I.E. password, etc..)?
  8. Show us some code and I'll take a look for you.
  9. step 1 is to share your code. Without it we are of zero help to you
  10. Line 17.. check there. Likely that is where your coding issue is.
  11. The issue appears to be on line 17 of your code. Try looking there and let me know what you come up with.
  12. If there was a LIKE button for your comment I'd press it.
  13. I edited my post while you were viewing the page. Please refresh to get the correct code.
  14. The issue is that your query will pull the value if ANY of the following items are true.... 1) status ='1' AND (title LIKE '%a%') 2) (titletext LIKE '%a%') 3) (tags LIKE '%a%') 4) (originaltitle LIKE '%a%') 5) (url LIKE '%a%') What exactly do you want your results to be? Since you are using "OR" if ANY of those items are true they will be pulled. What mikesta707 is saying is that if you move the parenthesis around you will be able to alter your out put. For example... SELECT * FROM videos WHERE status ='1' AND ((title LIKE '%a%') OR (titletext LIKE '%a%') OR (tags LIKE '%a%') OR (originaltitle LIKE '%a%') OR (url LIKE '%a%')) ORDER BY (videos.up-videos.down) DESC LIMIT 0, 5 Note that I added in another set of parenthesis. The query I wrote would be True only in 1 cases... 1) status ='1' AND ANY of the following are true.. (title LIKE '%a%') OR titletext LIKE '%a%') OR (tags LIKE '%a%') OR (originaltitle LIKE '%a%') OR (url LIKE '%a%')
  15. Well you need to first write a mysql query to gather all of the results. I honestly don't know why you need to store them in an array unless you need to some how modify the order but that too should be able to be done in the query. Then after you do the query loop through all results and echo them out to the screen. Try writing out this code and let me know what you come up with.
  16. There may be a way to do this with a regular expression but I have no clue how to do that so I would do something like this.. <?php //this case would be MM-DD-YYYY if ((strpos($dateStr, "-") == 2) && (strrpos($dateStr, "-") == 5) //then strip off the last 4 characters //this case would be YYYY-MM-DD else if ((strpos($dateStr, "-") == 4) && (strrpos($dateStr, "-") == 7) //then strip off the first 4 characters ?> would this work?
  17. Ok, so ping requests are blocked. IF there is ANY files on said remote server even a hello.txt file with that simply contains the word "hello" on the page.. you could use php curl to or fopen to open said remote file. IF the file can be opened and the word hello read in then you know the server is up and running. If not then said server is down. Let me know what you come up with.
  18. <?php If ($code == non_existent) $help = false; else $help = true; ?>
  19. If you have phpmyadmin log into there, select your table and then in the mySql box copy and paste the query in.. "select * from listtest order by id asc" What happens? Any results? What if you View>Source of the page. Is anything showing up then? It could be you have an issue with your html
  20. I don't understand why you can't just ping the remote server first to see if it is up. IF so then get token. If not then allow the user to be able to see the limited section you mentioned. That or use php Curl to first open any page on said remote server to see if it is up. IF so then get token. If not then allow the user to be able to see the limited section you mentioned. Also, I have to say this too: If the remote server is going down that often that it is messing up your code than maybe your code is not the problem here but rather this remote server.
  21. is the issue with the "require_once" statement? If so then just change that to "include" In the "include" file can you possibly first "ping" this other server to verify it is up? If so then you could do.. If server_up then show documents and everything else show everything BUT documents. Make sense?
  22. Why can't you just add another row? Adding another column seems extremely inefficient.
  23. Post your code so far. It will be in your mysql query where you say "AND expiration_date < now" or something along those lines.
  24. Post the code you have so far and I'll take a look
  25. I know that there is a much more efficient way to do this but this is the way that I know best.. You will need to start off reading in the file. I will assume that you know that and that you will store said items in the variable $contents. You will need to modify the loop I use too. This is very very rough code. <?php //start the CSV for your file $csv_string = ""; //create a position counter for how far you are in the file $position = 1; //create a temp value to store temp strings in $temp_string = ""; while (//you will need something here to determine the end but again that will depend on the method you are reading with) { //determine the starting location of the variable you are trying to strip $string_begin = strpos($contents,"dataFT", $position); $string_begin = strpos($contents,">", $string_begin) + 1; //determine the ending location of the variable you are trying to strip $string_end = strpos($contents,"<", $string_begin); //now you have the positions so you can strip out the variables $temp_string = substr($contents,$string_begin,$string_end-$string_begin); //now clean up any white space on the variable and then add it on to the end of the csv variable. $temp_string = trim($temp_string); $csv_string .= $temp_string.", "; //reset the position variable so you advance in the loop $position = $string_end; } //end of the loop //echo out your item here.. echo $csv_string ?> Again, I know that this is not the most efficient way to do it but it does get you the results you need.
×
×
  • 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.