Jump to content

ohdang888

Members
  • Posts

    1,285
  • Joined

  • Last visited

    Never

Everything posted by ohdang888

  1. ah, ok. I thought this was iframe? but, ok, glad you got it solved
  2. assign it a different id. and use a js function....like so: <script> function reloadImages(){ document.getElementById('firstID').src='url.png'; document.getElementById('secondID').src='url2.png'; } </script> <a href="javascript:reloadImages();">Test</a> <img id="firstID" src="test.png"/> <img id="secondID" src="test2.png"/> And for your second issue: I'm more than fine helping, but i'm not going to write all your code for you. Give it a try, and post your problems in the PHP forum when you encounter them. However, the way you are wording that issue (#2) makes me think you're not sure about the different between Javascript and PHP. JS is client side, PHP is server side, they happen at different times. So in order to interact between the 2, you much echo (with PHP) the data you want into JS vars, and if you want JS to give data to PHP, you must reload the page with a new url containing the info, or with AJAX
  3. well idk how jQuery inserts that image, so i can't say. post that here
  4. not that i'm aware of. for instance , in this forum, when you click a smiley, you get "source" for that image like "" or " " and then when the page is rendered, these are replaced with the <img> tag with the corresponding url of the smily image
  5. All this depends how fast you can code, and how much of each day you can spend coding.
  6. i believe you can, but its easier to just use the same class (and form what you said, it seems pointless to use more than 1 here) but anyways, say we have class "class1" and "class2" class class1 { var $class2; public function TEST(){ echo $this->class2->we_want_this_var; } } class class2{ var $we_want_this_var; } $class1 = new class1; $class2 = new class2; $class2->we_want_this_var = "this is what we want"; $class1->class2 = $class2; // DEFINE this "class2" var stored in "class1" as an instance of class2 (the class); $class1->TEST(); Try that, and then if it works, play around with it
  7. if you are using a PHP platform yourself, you can use cUrl with POSTDATA to transfer the data through the $_POST var
  8. Just curious... i'm only fluent in english, and i had a hard enough time getting good at PHP, i can't even imagine doing it if the function names where in another language
  9. unless you're just amazing beyond belief at security, i wouldn't build that. Thats just asking for people who are looking to hack something for the first time. You can't get much more open than that.
  10. Oh is an iframe that other domain names would use? You'll need to include like an api key and secret in the "src" in order to authenticate the client.
  11. Your upload script seems fine. And your $_SESSION vars are fine too. So, whats the problem? Is it returning errors? just blank? Another side note: You're not truly understanding the reason PHP was built. Imagine how long that would take to update even 50 files. With all due respect, that setup is ridicolous, even for a dev app. Its impossible to build a decently good system with that. You need to, VERY soon, make a single "profile.php" page, where it takes the $_GET['username']... so instead of dozens of files of usernames... you would have a url like profile.php?username=$_POST['username']
  12. the VERY first line of code at the VERY top of your page needs to be: <?php session_start(); ?>
  13. before i begin, i think this is off topic from what you wanted, but it is nevertheless an issue in your security (storing that data in $_SESSION) ok, the solution i'm thinking of is very inefficient, and i wouldn't advise this on a large scale, but then again i wouldn't advise your current setup. anyways, here goes: hardcore a mysql connect into the files with a generic username, database, etc. Have a table that includes the new table, database names, usernames, etc. (passwords too, i guess. theres a way around doing this, but thats even more innefficient).. and have the column "setting_id" or something, and assign the user a setting id from one of the possible tablesets, etc. Store THAT setting id in $_SESSION, and again, hardcore a mysql query that selects their new tablesets, and use mysql fetch array to get that information into variables that you will use from then on. Run another mysql connect, db_select, all with your new information I'm not sure what you're trying to protect and whatnot, but unless its particularly important or sensitive data, this method (in my opinion) is not worth the extra time and CPU load on the server
  14. Are the mysql connection details you're storing in SESSION unique? If not, just write the mysql_connect function in the file.
  15. well, i may sound stupid here, but just to cover the basics: you did run the query, right? like this: $query = "SELECT * FROM table1,table2 WHERE table1.column LIKE \"%$var%\" OR table2.column LIKE \"%$var%\" ; $result = mysql_query($query) or die(mysql_error()); echo mysql_num_rows($result);
  16. Ah! Now we're getting somewhere! This isn't tested, but you should be able to do this with a NOT statement.... SELECT * FROM table WHERE code IN('A', 'B', 'C') AND code != 'C'
  17. I don't know why i'm even helping you after how much of an aggroant ass you apparently, but anyways: the IN statement does that for you, what you are trying to achieve. Your logic of trying to use "code IN ('A','B','C') AND code IN ('A','B')" does not make sense in the least. Then why are you trying to add "C" in there, if you ONLY want A or B? are you exploding a array that has data you don't want in there? If not, i don't see what your issue is. And, while i'm no expert, i've been using mysql for 3 years. So before you start complaining that i don't know my stuff, why don't you do a few of the following things: 1)realize this is FREE help 2)word your problem better, cause its not like you're getting an overwhelming response here
  18. what do you mean? you want to make its value a link? var newtext2 = obj( "reply" ).value; document.getElementById('test').href = "www.google.com"; document.getElementById('test').innerHTML = newtext2; with this html: <a id="test"></a>
  19. why would you use BOTH "code IN ('A','B','C')" AND "code IN ('A','B')" theres no point to that. If you want where the code is A or B, just use "code IN ('A','B')"
  20. to use two tables, its likethis: SELECT * FROM table1, table2 WHERE table1.column1 = '$var' AND table2.column2 = '$var'
  21. use onClick for your link to the next page... and make it this: window.location.href = 'yourpage.php?time=' + currentTime;
  22. well, are you even gonna try it? We're not gonna sit here and write code for you
  23. you'll need to use AJAX to contact a php file on your server that will contact the other domain. and then return the results to the javascript function
  24. Nope. This code $_POST['answers'] = "red\ngreen\nblue"; $answers = explode("\n", $_POST['answers']); print_r($answers); works just dandy for me...returning Array ( [0] => red [1] => green [2] => blue ) BUT: I am a freelance PHP developer. Freelance does not mean that my work is free. If I help that means I took time away from making money, please don't be grumpy. And I may or may not have tested my code, if I posted it then most likely my IDE said the syntax was correct however that does not mean that it works. I just had to throw that in there, because, you just never know when someone is gonna sue you for giving them code that doesn't work
×
×
  • 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.