| We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| PHP Support Topic | |
|---|---|
| Tweet Topic Started: Apr 5 2005, 05:42 PM (2,073 Views) | |
| kingy | Apr 20 2005, 12:18 PM Post #31 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
can somebody troubleshoot this for me please. The idea is it prints infomation about the user names in the SELECT (which will be dependant on who is logged in. I get a parse error whenever i run the script, annoying because it says the problem is with the ?> tag.
it is my first try at something like this so i may have a few errors! thanks seth for the session thing! |
![]() |
|
| Dennis | Apr 20 2005, 12:31 PM Post #32 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Try this:
|
![]() |
|
| kingy | Apr 20 2005, 12:50 PM Post #33 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
the "or die" bit should be on that line too but got text wrapped, thats not the problem i am afraid. thanks anyway |
![]() |
|
| Dennis | Apr 20 2005, 12:56 PM Post #34 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
You should try wrapping variables in single quotes ('). That may do it. |
![]() |
|
| kingy | Apr 20 2005, 01:00 PM Post #35 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
which ones? i always thought double quotes are fine by the way i got my session thing done! if you want to know how i did it qj feel free to pm me! |
![]() |
|
| Jory | Apr 20 2005, 02:10 PM Post #36 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
For some reason I have no idea what the "or die" part does. (guess that if the mysql_connect doesn't work $dbh becomes "Unable to connect to MySQL" right?)
What does this do again :$ (Just can't remember. *Qj feels stupid & n00bish ) |
![]() |
|
| Tom! | Apr 20 2005, 02:27 PM Post #37 |
|
Wheeeee
![]() ![]() ![]()
|
would be valid syntax :luna: |
![]() |
|
| kingy | Apr 20 2005, 03:33 PM Post #38 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
thanks Tom! Qj, "or die" provides an error message for the script, so that it tells you something is wrong rather than just giving a php error. echo "Hi {$stats1['username']}"; gets the username from the stats1 array I have it working now everybody thankyou very much! However, i now have another problem (3 in one day, my bad) I have a timestamp(14) field to get when a registration is made, this works fine, but what i would like to be able to do is somehow get a script to convert this into hours, so that i could determine how long somebody has been a member in hours. (for a member page) |
![]() |
|
| Seth | Apr 20 2005, 07:41 PM Post #39 |
|
I has a pony
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Take timestamp @ current moment. Take timestamp set when user is registered. Subtract. Divide by 3600, take floor(). |
![]() |
|
| kingy | Apr 21 2005, 12:35 PM Post #40 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Seth you are a genius of the highest order! thankyou so much! |
![]() |
|
| Seth | Apr 21 2005, 12:48 PM Post #41 |
|
I has a pony
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
![]() It's all about using the tools you've been given by PHP. |
![]() |
|
| kingy | Apr 21 2005, 01:46 PM Post #42 |
|
1 in 10 people understands binary, the other 1 doesn't
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
indeed...i think the problem i have is that i tend to overcomplicate things, but php often has really simple answers! anyway thanks again |
![]() |
|
| dbzlotrfan | May 10 2005, 10:18 PM Post #43 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
few things that I want to know about): Class(es) Foreach Arrays (=>) defines (define( 'ROOT_PATH', './' ); define( 'KERNEL_PATH', ROOT_PATH.'ips_kernel/' ) ; ) {without the space} also may some other things that are shown (/seen) in the IPB soruce code (of like admin.php, index.php, (/others)). Thank you. |
![]() |
|
| shockwave- | May 11 2005, 04:09 PM Post #44 |
|
My other title is a Ferrari
![]() ![]() ![]() ![]()
|
Hey, I need a voting script. I started a topic, but it doesn't seem to be very popular. Here's the link: http://support.invisionfree.com/index.php?showforum=95 (note) I do not want a poll. |
![]() |
|
| dbzlotrfan | May 12 2005, 10:27 PM Post #45 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
what is a: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING ? I know what the parse error is, I mean the T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING. the line of code that's giving me that is this: $lang['mod_bansel'] = "Miembros inhabilitados"; |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · Technology Chat · Next Topic » |
| Track Topic · E-mail Topic |
6:24 AM Jul 11
|



![]](../../../../0/1/0/p601690/pipright.png)




6:24 AM Jul 11