|
Joined: Apr 2002
Posts: 474
Enthusiast
|
Enthusiast
Joined: Apr 2002
Posts: 474 |
I added two fields to my post table and can't figure out why addpost.php will not update the database. isn't this correct? <br />$query = "<br /> INSERT INTO {$config['tbprefix']}Posts (B_Board,B_Parent,B_Main,B_Posted,B_Last_Post,B_IP,B_Subject,B_Body,B_Kept,B_Status,B_Approved,B_Icon,B_Reged,B_Poll,B_Replies,B_Topic,B_Convert,B_PosterId,B_AnonName,B_Sticky,B_ParentUser,B_CalDay,B_CalMonth,B_CalYear,B_AddSig,B_FMVersion,B_FMPlatform)<br /> VALUES ('$Board_q','$Parent','$Main','$date','$date','$IP_q','$Subject_q','$BodySig','$Kept_q','$PStatus_q','$Approved_q','$Icon_q','$Reged_q','$PollId','0',$MainTopic,'$convert_q','$posterid','$AnonName_q','$Sticky','$ParentUser','$calday','$calmonth','$calyear','$addsig','$fmversion','$fmplatform')<br />";<br /> if you want to see the template or script let me know I'll post em.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
The query is correct - maybe the variable isn't getting set right. To test - before that query put this: echo "fmversion: $fmversion fmplatform: $fmplatform"; exit; Now make a post - the screeen will display the above. Make sure they each have a value, if not, track it back and check all the variables. Might be a typo somewhere.
|
|
|
|
Joined: Apr 2002
Posts: 474
Enthusiast
|
Enthusiast
Joined: Apr 2002
Posts: 474 |
this was the result... fmversion: fmplatform: I have this near the top of the script... $fmversion = get_input("fmversion","post"); $fmplatform = get_input("fmplatform","post");
Last edited by oceanwest; 09/22/2004 9:59 PM.
|
|
|
|
Joined: Apr 2002
Posts: 474
Enthusiast
|
Enthusiast
Joined: Apr 2002
Posts: 474 |
This is the code in the template (newpost.tmpl) <br />{$ubbt_lang['FM_VER']}<br /><br /><br /><select name="fmversion" class="formboxes"><br /><option value="{$user['U_FMVersion']}">{$user['U_FMVersion']}</option><br /><option value="">----</option><br /><option value="">n/a</option><br /><option value="">----</option><br /><option value="3">3</option><br /><option value="4">4</option><br /><option value="5">5</option><br /><option value="6">6</option><br /><option value="7">7</option><br /><option value="">----</option><br /><option value="Dev 6">Dev 6</option><br /><option value="Dev 7">Dev 7</option><br /><option value="">----</option><br /><option value="Server 3">Server 3</option><br /><option value="Server 5">Server 5</option><br /><option value="Server 7">Server 7</option><br /></select><br /><br /><br /><br />{$ubbt_lang['FM_OS']}<br /><br /><br /><select name="fmplatform" class="formboxes"><br /><option value="{$user['U_FMPlatform']}">{$user['U_FMPlatform']}</option><br /><option value="">n/a</option><br /><option value="Windows XP">Windows XP</option><br /><option value="Windows 2000">Windows 2000</option><br /><option value="Windows 95/98">Windows 95/98</option><br /><option value="Mac OS 9">Mac OS 9</option><br /><option value="Mac OS X Panther">Mac OS X Panther</option><br /><option value="Mac OS X Jaguar">Mac OS X Jaguar</option><br /><option value="Linux">Linux</option><br /></select><br /><br /><br />{$ubbt_lang['POST_TEXT']}
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Are you previewing? If so you'll need to add them as hidden fields in the addpost_preview template - otherwise there's nothing passing them from addpost.php back to addpost.php when the post is made. I bet the way it is now would work without preview.
|
|
|
|
Joined: Apr 2002
Posts: 474
Enthusiast
|
Enthusiast
Joined: Apr 2002
Posts: 474 |
Thanks That did the trick.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Power of the fanny pack.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,575
Posts293,929
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|