Jump to content

dannyb785

Members
  • Posts

    544
  • Joined

  • Last visited

Everything posted by dannyb785

  1. you'd do <a href='news1.html' onClick="window.open('viewimage.php?id=64','mywindow','scrollbars=yes,width=WIDTH,height=HEIGHT')">
  2. I feel dumb for not noticing the http:// before the image location.
  3. lol I thought you meant single quotes when you said backtick.
  4. Hey wolphie, wanna show me where I was idiotic? Also, show me where I told him his code was wrong. His code performs a task. I didn't think, based on the initial question, that the code provided performed the task requested. I was the first person to reply and post help! That's what I contributed. I also contributed the fact that you can't gather php code from a php file uploaded to a server just by running a fopen script.
  5. Dude, remember what i said about using the AS in your query? First off, you aren't grabbing any data from row['ammo'], $row['bank'], $row['money'], $row['titanium'], or $row['uranium']. Secondly, I wasn't clear about the AS. you need to have and AS for each variable you're getting. So in your case, you'd do "SELECT SUM(ammo) as ammosum,SUM(bank) as banksum, etc..." then after your $result is fetched, you have $row['ammosum'], $row['banksum'], etc... So basically, you're dividing by zero because $economy has no value(so by default, a zero is used) since there are no values in $row['ammo] and so on.
  6. Don't use either. You'll never learn if you have things doing the code for you. I've never used any of those programs and I do just fine.
  7. ok, do me a favor and gather the php code for facebook's /home.php
  8. you're trying to print the resource that was gathered by doing the query. A query makes a resource(or we like to call it a $result) A $result needs to be put into $row using mysql_fetch_array(). then the variables from the database can be used. But before mysql_fetch_array(), your query is useless.
  9. who really cares? we know what they mean
  10. you didn't answer my question. Is the file a valid .php file, and you are using fopen to read the php code?
  11. oh lol oops. I was confused by the way your post was setup. I need to reread
  12. the part without the "a" colors the text(and anything else that doesnt already have a specified color. and the "a" part colors the link. Think of it like a html tag. If it was a b instead of an a, then all bolds(since the tag is < b > ) would be that color.
  13. you don't need mysql_close. Where are you getting the $conn variable from??
  14. nothing wrong with my code. clearly1981 clearly didn't type the code, clearly. ah, i crack myself up
  15. That's because you're trying to output an entirely different page depending on what variables are what value. I don't understand... they put the right password and they are redirected to the registration page? Isn't that before registering??
  16. *slightly upset* you didn't do the code exactly as I typed it... check it again
  17. did you have a beginning <?php in that code? And did you upload it to a server in .php format? And when you ran the script, did it read the php code or the output in html format? I know what the answer is. Neither of us are wrong in this thread, we are just both interpreting the guy's question differently. There is no [easy] way to get pure php code from a .php file(if that's what he's asking)
  18. Ok the way you did it wayyyy crazy. Your problem is not having a '.' after $model. But the problem is bigger than that. You need cleaner code. Not only so you can do things easier, but you can find errors better and others can see your code and help you out. Here's a better way to do what you're doing: $where = " WHERE type = '$model' "; Though I will say that the way you do it by breaking it up into 3 variables is very unnecessary and if anything takes up more resources by using 3 variables when you really don't even need one. Just put the entire string into the query by itself.
  19. What are you trying to do? I'm positive there's a cleaner and easier way of getting it done.
×
×
  • 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.