The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
You don't need to use a variable, just use:
PHP Code:
|
#12
|
||||
|
||||
hmm it just changes it to 0
|
#13
|
||||
|
||||
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. |
#14
|
||||
|
||||
oh i removed, the update query from the loop
heres my current code: PHP Code:
|
#15
|
||||
|
||||
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;"> <tr> <td><strong>At this time you must host your own images</strong></td> </tr> <tr> <td class="thead">Required Information</td> </tr> <tr> <td class="gal1"><form action="gallery.php?do=insert" method="get"> <input type="hidden" name="id" value="$id"> <input type="hidden" name="artid" value="$bbuserinfo[userid]"> <input type="hidden" name="artname" value="$bbuserinfo[username]"> Image Name:<input type="text" name="imgname" value="Image Name" maxlength="35" size="20"> </td> </tr> <tr> <td class="gal2">Image Description:<br /><textarea name="imgdes" maxlength="900" rows="3" cols="45">Put your image's description here</textarea> </td> </tr> <tr> <td class="gal1">Image Url:<input type="text" name="imgurl" value="Image's Url" maxlength="255"></td> </tr> <tr> <td class="galhead"><input type="submit" value="Submit Entry"></td> </tr> </table> </form> |
#16
|
||||
|
||||
PHP Code:
|
#17
|
|||
|
|||
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 |
#18
|
||||
|
||||
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"> <input type="hidden" name="gallery_id" value="$id"> <input type="hidden" name="artist_name" value="$bbuserinfo[username]"> <input type="hidden" name="artist_id" value="$bbuserinfo[userid]"> Image Name:<input type="text" name="image_name" value="Image Name" maxlength="35" size="20"> </td> </tr> <tr> <td class="gal1">Image Url:<input type="text" name="image_url" value="Image's Url" maxlength="255"></td> </tr> <tr> <td class="gal2">Image Description:<br /><textarea name="image_des" maxlength="900" rows="3" cols="45">Put your image's description here</textarea> </td> </tr> <tr> <td class="galhead"><input type="submit" value="Submit Entry"></td> </tr> </table> </form> |
#19
|
||||
|
||||
anyone know how to solve my insert query problem?
|
#20
|
|||
|
|||
Quote:
Hope that helps somewhat. Cheers, g-force2k2 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|