);
// If there's an action option
- if (isset($_REQUEST['option'])) {
- $option = trim(filter_var($_REQUEST['option'],FILTER_SANITIZE_STRING));
- }
-
+// if (isset($_REQUEST['option'])) {
+// $option = trim(filter_var($_REQUEST['option'],FILTER_SANITIZE_STRING));
+// }
+//
+ $option = $_REQUEST['option'];
+ echo $option;
$socialData = $this->editEntry($memberID);
if (!$socialData) {
);
}
-
+
// if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') {
if ($option == 'submit') {
if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
glmMembersAdmin::addNotice("<b> Social Update:</b> $memberID", 'Process');
}
-
+echo $option;
// If update was successful then use editEntry() to setup for the edit again.
if ($socialData) {
$socialUpdated = true;
// Also update all member info records with any possible name change
- $sql = "
- UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
- SET facebook_url = 'www.testval.com'
- WHERE member_id = 1
- ;";
+ $sql = "
+ INSERT INTO ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
+ (member_id,facebook_url)
+ VALUES (1, 'www.failedcheck.com')
+ ;";
// $sql = "
// UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
// SET facebook_url = '".addslashes($socialData['fieldData']['name'])."'
<h3>Social Model</h3>
<p>{$displayData}</p>
<a href="{$thisURL}?page={$thisPage}&glm_action=more">Click me to see more!</a>
- <form action="{$thisURL}?page={$thisPage}" method="post" enctype="multipart/form-data">
- <input type="submit" class="button glm-button submit" value="submit">
+ <form action="{$thisURL}?page={$thisPage}&glm_action=social&member=1" method="post" enctype="multipart/form-data">
+ <input type="submit" class="button glm-button submit" value="submit" name='submit'>
<input type="hidden" name="option" value="submit">
<div class="button glm-button right">Update</div>
<table class="glm-admin-table">