Jump to content

gizmola

Administrators
  • Posts

    5,945
  • Joined

  • Last visited

  • Days Won

    145

Everything posted by gizmola

  1. Exactly. If for example, you use a reverse proxy for load balancing, REMOTE_ADDR will be the same for every user. In that case, PHP will typically load $_SERVER['HTTP_X_FORWARDED_FOR']. It will often be an array with all the IP addresses that were utilized.
  2. Yes put will overwrite an existing file, so long as the permissions allow it. Just in case you were wondering, the put command is a commonly used alias for the FTP STOR command. FTP like a lot of internet protocols has a series of RFC documents that describe it. If you look in the FTP RFC #959 for the STOR command you'll find this:
  3. I'm sorry but this just isn't the place for you, and your approach is doomed to fail. If you want to take the time to write up a detailed list of requirements for what this site is supposed to do, I can take a quick look and see if there's something close in the joomla module world, but if what you're looking for is what it sounds like (an amazon marketplace mini-clone) then I'm not sure you're going to have much luck. You might also want to look at Lemonstand, Magento, Zencart/oscommerce and other php based e-commerce packages. See: http://php.opensourcecms.com/scripts/show.php?catid=3&category=eCommerce
  4. binary tells ftp to use binary transfer mode, rather than the default of ascii. If you have text, you might want to omit that line. literal pasv tells the server to use pasv mode. Without going into a long explanation, ftp transfers won't work if the client is behind a nat'd firewall, so it's best to set this mode on in most cases.
  5. You are on the wrong track. Just for stylistic reasons, I changed the use of classes to id's, but that is not the main problem. Try this instead: function moveTo(){ $id = $(this).closest("ul").attr("id"); if ($id == 'group-video-select-friends') { $(this).appendTo("#group-input-names"); } else { $(this).appendTo("#group-video-select-friends"); } } $(document).ready(function(){ $("#group-video-select-friends li").click(moveTo); $("#group-input-names li").click(moveTo); }); Make sure that you're ul's use the id's named. group-video-select-friends </pre> <ul id="group-video-select-friends"> Bob Ted Carol Alice </ul> <br><br><h3>group-input-names</h3> <br><ul id="group-input-names"> </ul
  6. We already suggested to you the standard way to do this. I don't know what more we can say to you at this point. It's almost like you are saying you don't know what a link is, or how it works.
  7. The way you do this, as Wildteen suggested is to have your product_list.php script utlize a url parameter of brand. Then get this parameter inside product_list.php using: $brand = $_GET['brand']; As he mentioned you need to handle a couple of possibilities: - Did they try a sql injection? - Did they go directly without a brand= parameter. - Did they specify an invalid brand So you need some code to check for these issues and deal with them as you desire. A typical solution might be to display an error page, or to default the brand to something you desire.
  8. Really? foreach ($kw as $keyword) { echo "$keyword "; }
  9. We tutor and help people every day here. The only thing is that you need to bring something to the table, in terms of what you have so far. The more specific the question, the better the answers tend to be. If you're not to that point, a much better suggestion for you would be to check out tutorials and see if there's one for building something similar to what you want. Last but not least, in many cases using a CMS like Drupal or Joomla is a better site building solution for someone like yourself (and ultimately your mother) than trying to take on learning how to make a professional website, which is a substantial challenge.
  10. That is the skeleton of what you need. I glanced at your code, and the exercise for you now is to take my skeleton and apply it to your specific tables structure and queries. What code you need where I typed the comments depends on what sort of markup you are going to use. Are these nested lists? Tables with embedded tables? You really need to provide more specific information and code to get me to invest more time in an answer.
  11. Yes, Newegg is a one of the best known tech product companies there is.
  12. Mikosiko, I did read your answers. You simply didn't read the original question carefully enough and suggested fixes for problems that were irrelevant to the issue. I have done the same countless times. With as many experienced developers as we have at phpf, you will inevitably come up with the wrong answer from time to time. I hope you won't take it personally because your post introduced red herrings that were not helpful, and I stated as much. The goal here is to help the OP, and it doesn't help them to send them on a wild goose chase.
  13. They are both solid vendors with a long track record. It's silly to base your decision on a thread here. As a developer, one of the things I wanted in my most recent notebook computer was a chip that supported virtualization, so I could run 32 and 64 bit virtualized operating systems on the notebook using sun virtualbox. My point is ... you need to have some criteria to get any meaningful feedback, otherwise you're just asking for anecdotes.
  14. Newegg? http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&DEPA=0&Order=BESTMATCH&Description=notebook+computer+refurbished&x=0&y=0
  15. That is why I put the comment "assuming... etct..etc"... and "as there is no problem making multiple mysql connections"... is true only if you are not reaching the Max_connection limit defined for your installation Again, this was not the problem, as she described in her first message that she received an error saying it couldn't find the table.
  16. It's ok, leave that out as it has no bearing on this problem. Try the small tweak I suggested.
  17. mikosiko, That's not the problem. That code was put in after people suggested that as debugging, but it is neither here nor there, as there is no problem making multiple mysql connections. In the case of that code, it makes a 2nd mysql connection assigning the resource variable to $link, but she never uses it for anything. $connection is setup earlier, and a single connection can be used for many mysql queries. None of this should be a problem.
  18. Well of course, you have only one variable you are checking $_POST['approve'], and I assume this form has a table or list of posts. You would need some sort of scheme in the form, so that you can tell which post out of many has been approved, denied, deleted etc.
  19. This type of problem is best handled using regular expressions. Use the preg_match() function. preg_match
  20. Yeah for text data you always want to run mysql_real_escape_string() on it before trying to insert or update.
  21. You are not checking the result of your mysql_query for the insert. Chances are you have a syntax error. It's also best practice on inserts, to include the column list: INSERT INTO AccessLogs (col1, col2...etc) VALUES ... You can then exclude columns that you don't need from the values list, and also be assured that you will not have an error. You can also include the single quotes around array keys simply by specifying a php block around those values. The code is clearer, and PHP does not have to try and resolve constants. mysql_query("INSERT INTO AccessLogs VALUES ('','{$_SESSION['UserID']}', '', NOW(), '$log_text',' {$_SERVER['REMOTE_ADDR']}')");
  22. This is not a helpful description of your problem. Exactly what works and what doesn't work?
  23. I'm really grasping at straws here, as I don't see anything wrong with any of the code you have, but just to rule it out try this in your content.php </pre> <table id="structure"> $subject_set = mysql_query("SELECT * FROM subjects", $connection); if (!$subject_set) { die("Database query failed: " . mysql_error()); } while ($subject = mysql_fetch_array($subject_set)) { // Connect to mysql here or die echo "{$subject["menu_name"]}"; $page_set = mysql_query("SELECT * FROM `pages` WHERE subject_id = {$subject["id"]}", $connection); if (!$page_set) { die("Database query failed here: " . mysql_error()); } echo ""; while ($page = mysql_fetch_array($page_set)) { echo "{$page["menu_name"]}"; } echo ""; } ?> Content Area </table> <br>?&g
×
×
  • 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.