![]() |
getting some errors
ok trying to code this but its being evil!
PHP Code:
Line 21 is this: PHP Code:
|
you forgot a ; one line before
|
omg woops, xeon u always catch my small errors.
im so stupid>_< |
ok i cant get this thing to add 1 to # views it gets from DB
this is my code: PHP Code:
|
anyone have any ideas or tips for making it add one to the views and not just chaning it to one
|
1. Don't bump threads until atleast 24 hours later
2. For the UPDATE query, use: PHP Code:
|
dont need to use $gallery[gallery_views]?
|
I wouldn't, infact if you only want to add 1 view, i'd use:
PHP Code:
|
thanks;)
ill update the thread as experience more evil problems>_< |
darn still aint adding 1 to the view T_T
heres my current code: PHP Code:
|
You don't need to use a variable, just use:
PHP Code:
|
hmm it just changes it to 0
|
1. I wouldn't query in a loop if I were you.
2. I'm not sure why it's not updating - I used the exact same method for my Tutorial Hack and it works perfectly. |
oh i removed, the update query from the loop
heres my current code: PHP Code:
|
hmmm i can get this to insert stuff in the table
heres the code: PHP Code:
HTML Code:
<table align="center" class="tborder" style="border: 1px outset;"> |
PHP Code:
|
First off
PHP Code:
Also you don't need any quotes at all PHP Code:
Only reason I can see that the data doesn't update correctly is that the url is not yourscript.php?view=gal, other then that it should update, unless you also defined the templates to eval elsewhere. You can free the memory that is used by the query after the while loop PHP Code:
g-force2k2 |
thanks guys ill try it out when i get home
gforce i am defining $id through the link to the gallery from the gallery index. example: gallery.php?view=gall&id=1 where should i put that free result im a tid bit new to php but i think im doing ok, also can someone help me out with my post on inserting stuff into the db, i have clue y it doesnt work edit: thanks to both of you, its updating views now;) now i gotta sort out that inserting>_< edit2: ok i changed the insert query to this but it still aint working: PHP Code:
HTML Code:
<form action="gallery.php?do=insert" method="get"> |
anyone know how to solve my insert query problem?
|
Quote:
Hope that helps somewhat. Cheers, g-force2k2 |
well i fixed my insert query, it turns out by sending it to gallery.php?do=insert didnt work because when the forum is submitted it wrote a new url called gallery.php?etc. without a do=insert; so basically that was the prob. i have 2 other questions, ive seen in hacks that people use like "type the forum ids you wish to exclude with commas inbetween each", how does that work, i can only thing of something equalling one thing. also the book i have for php doesnt explain how to order things or grab the last entry of sumthing. can someone explain that to me?
|
can anyone help with the mentioned above?
|
can someone explain to me why this doesnt work:
PHP Code:
|
PHP Code:
|
thanks dean:D
edit: didnt work>_< could it be because $submitgal is grabbing a template and then im using $submital in another template to call $submitgal's template? |
anyone know how i could grab the last image added to a gallery(kinda like vb's last post)? and i see in a lot of hacks people say user groupid's who can view: 6,5,4
i dont get how commas create multiple conditions so is the hack in php basically PHP Code:
|
PHP Code:
|
cool thanks ill try it out and post if it works but i still dont get y the usergroup if statement wont work>_<
edit: im confused, what do i use the blahblah(); thing for? |
It's called pseduo code - just put the code in there that you want based on the if condition :)
|
hmm its giving me a parse error on line 33.
PHP Code:
also anyone know or have any good tutorials or suggestions on how to do pagination? |
You don't need that . infront of the =. And what's this 'submitbutton' infront of the eval?
|
Quote:
also the submitbutton(); replace blahblah(); , see dean's post |
Quote:
|
oh, ok.
ok i added my own search engine to my gallery, but now im getting parse error on line 180. this is 180: PHP Code:
found it, i forgot a }(silly me :D) |
You may have forgotten a ; or a } somewhere in the file.
|
yeah i figured that out, thanks for the help though.
now i added a results page to my search engine thingy but it only shows this: HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> PHP Code:
gallery_search_results: HTML Code:
$stylevar[htmldoctype] HTML Code:
<tbody> HTML Code:
$stylevar[htmldoctype] |
ok suddenly i cant view source anymore for web pages(i know this isnt php,html,etc.). im using windows anyone know how to reactivate it?
|
www.mozilla.org ;)
OK, if you want to stick with Internet Exploder (which I wouldn't recommend): http://www.winguides.com/registry/display.php/1246/ http://support.microsoft.com/default...;EN-US;Q306907 Thanks fly out to Google ;) |
Quote:
|
can anyone help me with my results page?
|
All times are GMT. The time now is 02:06 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|