Posted on: 02/20/04 03:16pm
By: lestat
In admin/story.php, regarding this function,
function submitstory
($type='',$sid,$uid,$tid,$title,$introtext,$bodytext,$hits,$unixdate,$co
mments,$featured,$commentcode,$statuscode,$postmode,$frontpage,$draft_fl
ag,$numemails,$owner_id,$group_id,$perm_owner,$perm_group,$perm_members,
$perm_anon,$delete,$show_topic_icon)
How are these values set when a new story is submitted to the database. The variables are being passed to this function, but where and/or at what point are the variables being set to the form values passed in HTTP? Is there a global $HTTP_POST_VARS where these values are set in?
Thanks.
story.php function question
Posted on: 02/20/04 04:43pm
By: Limynali
Geeklog uses global variables in PHP. This means that when a form is submitted, all the inputs are turned into variables.
For instance, if a textbox on that form had the name "bodytext" then a variable would be automatically created called $bodytext and would be initialized to the value of the textbox.
So most (if not all) of those variables are created and initialized through global variable "magic" and are not pulled from $HTTP_POST_VARS or $HTTP_GET_VARS.
story.php function question
Posted on: 02/20/04 04:57pm
By: lestat
thank you for the info. i added a select called "tradeposition" to the form. then i added "$tradeposition" to the end of the function submitstory argument list. after i submit a story i get "missing arguement 26 for submitstory()". arguement 26 is the place of $tradeposition. any thoughts? thank you.
story.php function question
Posted on: 02/20/04 05:01pm
By: Turias
You have to add it to the function argument list that you posted, as well as to where the function is called, at the end of the file.
story.php function question
Posted on: 02/20/04 05:31pm
By: lestat
That solved it! Thank you very much. Appreciated.