Jump to content

.josh

Staff Alumni
  • Posts

    14,780
  • Joined

  • Last visited

  • Days Won

    43

Everything posted by .josh

  1. It depends on what exactly you want to control on their computer. Javascript and vbscript are very limited in what they can access/change on one's computer. They were limited specifically for security purposes. You are not going to be able to go to your website, click on a user's name, and have sweeping control over their computer, even with js or vbs. You are going to have to write a server/client or p2p program with a platform language like c++ or visual basic or delphi or something, to do that. But regardless, I'd have to question your intentions with doing this...
  2. just make a condition. query to see if it's there. If it is, then update. If not, then insert.
  3. Now, I am noticing here: for($i =0;$i < $count ; $i++) { $editHistory = mysql_fetch_array($result); if ($editHistory['firstname'] == NULL) { $response .= "Unknown"; } else { $response .= $editHistory['firstname']; } if ($editHistory['lastname'] != "NULL") { $response .= " " . $editHistory['lastname']; } $response .= " on " . $editHistory['changeDate'] ." made change <br><span class=fontsize1emnormalPROFILEIndented>'" . $editHistory['logentry'] . "'</span><br><br>"; } return $response; } $count comes from $count = performSQLMultiRow("select firstname, lastname, logentry, changeDate from editHistory left join useraccounts on editHistory.uid = useraccounts.uid where keyValue = $DOGID AND tableName='DOG'",$result); Making it a result source, which isn't an integer to be counted to. I think you may need to change your code to: while($editHistory = mysql_fetch_array($result)) { if ($editHistory['firstname'] == NULL) { $response .= "Unknown"; } else { $response .= $editHistory['firstname']; } if ($editHistory['lastname'] != "NULL") { $response .= " " . $editHistory['lastname']; } $response .= " on " . $editHistory['changeDate'] ." made change <br><span class=fontsize1emnormalPROFILEIndented>'" . $editHistory['logentry'] . "'</span><br><br>"; return $response; }
  4. well..that COULD be it. That condition does echo out your query string, but I'm looking back at your original output and I'm not really seeing that "SQL : <query string>" or even the error...so...I think I have to take that back and say that I don't think that's it.
  5. So...was there a question in there somewhere? Offhand I'd say that it has to do with WHERE id='id'"; I have a sneaking suspicion your id column holds numbers in it instead of two letter words like 'id' you'll probably want to change that to a variable. But that's my best guess, seeing as how my crystal ball is in the shop.
  6. You can make a condition to check for each one or you can make an array. The id is not necessary for php. The name is what you would echo, and it will echo the value.
  7. that's right. If you take out $sql it won't show...however, it's showing because there is an error, causing $result to be false, so taking out $sql only keeps it from showing that, but it does not fix your error.
  8. You can do it without cpanel, but I suggest you download cpanel or something equivalent as it is much easier. You do not need to register sub domains with godaddy. You would do it on your own server (through cpanel or on your command line)
  9. A server has an ip address. You can go directly to your site by entering in the ip address in the address bar. If you would like to be able to do www.mydomain.com you need to register a domain name and have it point to your server. Your server/apache/whatever does not do this automatically. Basically a domain name is a "nickname" for your server. You pay some registrar domain name service money to reroute requests to mydomain.com to your ip. Now, SUB domains are done on your server. You would do that in cpanel or wherever.
  10. your function calls performSQLMultiRow where in your script is that
  11. Awesomesauce
  12. That shouldn't be showing at all, from the code you posted. Check your loop that calls that function to see if you have some sort of erroneous variable concatted onto where you return the displayed response. Failing that, look at your performSQLMultiRow function to see if something isn't being erroneously added on there. It looks like something you (or someone) may have used to echo stuff out for debugging, or else a query building string, that's somehow being tacked onto the end of your output. But it's not in the code you provided.
  13. Okay, you renamed your class. So if I read your script right, what should work is, instead of doing this: $parseObj = new parse("Templates/$zip_dir/install.sql"); $res = $parseObj->startParsing(); do this: $parseObj = new parsed(); // you did rename it to parsed, right? // $res = $parseObj->startParsing(); old method call // call this instead, passing the filename to it $res = $parseObj->parse("Templates/$zip_dir/install.sql");
  14. But that is exactly what you are asking. You're asking: // how do i get it to not show 'bar'? echo "foo bar"; to which the only response to that is: take it out. But then you're like..but how? So what do you expect me to say to that?
  15. p.s.- since you opted for changing the class name, your parse method pretty much becomes obsolete, unless you want to call that first, instead of startparsing.
  16. okay so now you renamed your class. You make a new object, passing your file name. You then execute startparsing() ...and it's trying to getfile but you never passed it the filename because your parse method that was acting as a constructor did that before, and now it's not doing that. So now you have to pass your argument over to it from inside your startparsing method.
  17. or the function. doesn't really matter. just don't make them the same name. Or you can setup your script to keep it as a constructor and just not call it twice. It's up to you.
  18. Are you seriously asking how to highlight/delete things out of a string? You find the part in your string you do not wish to have displayed, put your mouse there and click on that spot, and start tapping your delete button. Or you could get really fancy with some advanced editing skills and drag across to highlight it and then press delete.
  19. I believe it's because you have a method named the same as your class, making it a constructor. Your constructor automatically gets run when you create your object, which runs your setfile/startparsing methods, but then you turn around and run the method again here: $res = $parseObj->startParsing();
  20. It looks like you were going for some kind of splash screen but for whatever reason decided to give up on some kind of skip/redirect script and put your content under it. If you insist on that big animation and extremely vague motto (welcome to the new...website? I see your site saying it's under construction...are you really serious, making a spash screen advertise that?), make it a full fledged splash screen and add a skip/redirect for it.
  21. Do you really want to look for javascript help in a php forum, on a primarily php site? Normally I would move your thread to the javascript forum, but since you said you already posted there...nothing personal, but thread closed.
  22. <?php class chalkboard { function writedown ($msg, $num) { for ($x = 1;$x <= $num; $x++) { echo "$x : $msg <br />"; } } } $chalk = new chalkboard(); $chalk->writedown("I will post my code.", 100); ?>
  23. $variable .= "extra text";
  24. That's why they call me Super! haha j/k.
  25. You are right. You need Javascript to do this. Or you can use some html code to auto-refresh it to get an update, but that's not really the same...php is a server side language. Everything is parsed on the server and then sent to the client. Once it's done, that's the end of that, as far as php is concerned.
×
×
  • 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.