dannyb785
Members-
Posts
544 -
Joined
-
Last visited
Everything posted by dannyb785
-
you'd do <a href='news1.html' onClick="window.open('viewimage.php?id=64','mywindow','scrollbars=yes,width=WIDTH,height=HEIGHT')">
-
[SOLVED] unexpected T_CONSTANT_ENCAPSED_STRING
dannyb785 replied to cleary1981's topic in PHP Coding Help
lol I thought you meant single quotes when you said backtick. -
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.
-
[SOLVED] unexpected T_CONSTANT_ENCAPSED_STRING
dannyb785 replied to cleary1981's topic in PHP Coding Help
I call them single quotes... -
[SOLVED] Find the sum of 1 database column for every user
dannyb785 replied to MasterACE14's topic in PHP Coding Help
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. -
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.
-
ok, do me a favor and gather the php code for facebook's /home.php
-
[SOLVED] unexpected T_CONSTANT_ENCAPSED_STRING
dannyb785 replied to cleary1981's topic in PHP Coding Help
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. -
who really cares? we know what they mean
-
[SOLVED] Find the sum of 1 database column for every user
dannyb785 replied to MasterACE14's topic in PHP Coding Help
whats on 104? -
you didn't answer my question. Is the file a valid .php file, and you are using fopen to read the php code?
-
[SOLVED] unexpected T_CONSTANT_ENCAPSED_STRING
dannyb785 replied to cleary1981's topic in PHP Coding Help
what are backticks? -
oh lol oops. I was confused by the way your post was setup. I need to reread
-
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.
-
[SOLVED] unexpected T_CONSTANT_ENCAPSED_STRING
dannyb785 replied to cleary1981's topic in PHP Coding Help
you don't need mysql_close. Where are you getting the $conn variable from?? -
[SOLVED] unexpected T_CONSTANT_ENCAPSED_STRING
dannyb785 replied to cleary1981's topic in PHP Coding Help
nothing wrong with my code. clearly1981 clearly didn't type the code, clearly. ah, i crack myself up -
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??
-
[SOLVED] unexpected T_CONSTANT_ENCAPSED_STRING
dannyb785 replied to cleary1981's topic in PHP Coding Help
*slightly upset* you didn't do the code exactly as I typed it... check it again -
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)
-
check other thread for answer
-
can you show us its code?
-
[SOLVED] unexpected T_CONSTANT_ENCAPSED_STRING
dannyb785 replied to cleary1981's topic in PHP Coding Help
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. -
What are you trying to do? I'm positive there's a cleaner and easier way of getting it done.
-
whats saying undefined?