The Arcive of vBulletin Modifications Site. |
|
Adding fields, need help finishing.... Details »»
|
|||||||||||||||||||||||||
Ok, I'm needing to add a few fields to New Threads.
This is what I've done thus far: I've added the fields I need in the thread table in the vb database. In showthread.php, I added this: PHP Code:
PHP Code:
Now, when I submit this stuff, its not writing to the database, so I really don't know if the other parts are working correctly. So, if anyone has any suggestions, please me know. Thanks in advance! Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
|||
|
|||
|
UPDATE:
I get this error: PHP Code:
|
|
#3
|
||||
|
||||
|
Easy fix:
Change this: 'You can't see this either' To this: 'You cannot see this either' You had 2 ' symbols in the wrong place! You cannot use "can't" because the ' symbol conflicts with the query line. |
|
#4
|
|||
|
|||
|
ok then, that was the subject of the post so it shouldn't matter, i mean, regular posts have apostrophe's in them.
Any other suggestions? |
|
#5
|
||||
|
||||
|
I know regular posts have apostrophe's in them, but you are putting that in a query - each query variable has a ' around them to delineate them, but you have a ' inside 2 ' within a variable which will cause a mysql syntax error. PHP thinks your variable is 'You can' because the ' in can't has ended that variable, but there is no comma so the syntax error occurs.
|
|
#6
|
||||
|
||||
|
Just make the changes, and the syntax error should be resolved.
|
|
#7
|
|||
|
|||
|
lemme try dat..i'll post again.....
|
|
#8
|
|||
|
|||
|
I went back to the original newthread.php file and everything worked. THAT has the subject in it, so its not what you suggested. I added my other values back, and it again does not work. So, its something with the new stuff I'm adding which, but I can't find a problem with it. Any other suggestions?
|
|
#9
|
||||
|
||||
|
Ahhh... I see what you mean... you're right... I thought you had that statement in a query in a PHP file...
Should have read your posts better... Try this: Find: PHP Code:
PHP Code:
|
|
#10
|
|||
|
|||
|
Ok, that fixed the problem with writing it to the database.
Now, with what I have posted above, its not calling it up from the database. Any suggestions there? |
![]() |
|
|