2005-10-10, 10:37 PM
I have the following and it lists the what it's supposed to.
When I select an item from the select box and press "submit" and takes me to the page I want it to.
Unfortanetly I can't get the id
startform("add_link.php", "", "edit");
starttable();
tableheader($lang->edit_custom_link);
makeselectcode($lang->select_link, "links", "custom_links", "clid", "name");
endtable();
endform($lang->edit_link_button, $lang->reset_button);
cpfooter();
When I select an item from the select box and press "submit" and takes me to the page I want it to.
Unfortanetly I can't get the id
cpheader();
$clid = intval($mybb->input['clid']);
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."custom_links WHERE clid='$clid'");
$links = $db->fetch_array($query);
$links['name'] = stripslashes($links['name']);
$links['url'] = stripslashes($links['url']);
startform("add_link.php", "", "do_edit");
makehiddencode("clid", "$links[clid]");
starttable();
tableheader($lang->modify_doc);
makelabelcode($lang->link_id, $links['clid']);
makeinputcode($lang->get_link_name, "name", $links['name']);
makeinputcode($lang->get_url_name, "url", $links['url']);
endtable();
endform($lang->update_link, $lang->reset_button);
cpfooter();