real_escape_string($_POST['web_short_name']); $web_color = $petition->real_escape_string($_POST['web_color']); $petition_name = $petition->real_escape_string($_POST['petition_name']); $petition->query("insert into petitions (web_short_name,web_color,group_id,petition_name) values ('$web_short_name','$web_color','$group_id','$petition_name') "); header('Location: petitions.php'); } if(isset($_POST['petition_id']) && isset($_POST['petition_name']) ){ // edit $petition_id = $petition->real_escape_string($_POST['petition_id']); $web_short_name = $petition->real_escape_string($_POST['web_short_name']); $web_color = $petition->real_escape_string($_POST['web_color']); $web_color_text = $petition->real_escape_string($_POST['web_color_text']); $petition_name = $petition->real_escape_string($_POST['petition_name']); $petition_sign_text_box = $petition->real_escape_string($_POST['petition_sign_text_box']); $petition_circulator_text_box = $petition->real_escape_string($_POST['petition_circulator_text_box']); $eligibleVoterListWarning = $petition->real_escape_string($_POST['eligibleVoterListWarning']); $eligibleVoterListEnforce = $petition->real_escape_string($_POST['eligibleVoterListEnforce']); $eligibleVoterListField = strtoupper($petition->real_escape_string($_POST['eligibleVoterListField'])); $eligibleVoterListEquals = $petition->real_escape_string($_POST['eligibleVoterListEquals']); $eligibleVoterSigMatch = $petition->real_escape_string($_POST['eligibleVoterSigMatch']); $signature_goal = $petition->real_escape_string($_POST['signature_goal']); // custom landing page - paid feature one day? $tab_name = $petition->real_escape_string($_POST['tab_name']); $text_title = $petition->real_escape_string($_POST['text_title']); $text_block = $petition->real_escape_string($_POST['text_block']); $logo_url = $petition->real_escape_string($_POST['logo_url']); $petition->query("update petitions set web_color_text='$web_color_text', signature_goal='$signature_goal', logo_url='$logo_url', text_block='$text_block', text_title='$text_title', tab_name='$tab_name', eligibleVoterSigMatch='$eligibleVoterSigMatch', eligibleVoterListWarning='$eligibleVoterListWarning', web_short_name='$web_short_name', web_color='$web_color', petition_name='$petition_name', petition_sign_text_box='$petition_sign_text_box', petition_circulator_text_box='$petition_circulator_text_box', eligibleVoterListEnforce='$eligibleVoterListEnforce', eligibleVoterListField='$eligibleVoterListField', eligibleVoterListEquals='$eligibleVoterListEquals' where petition_id = '$petition_id' "); header('Location: petitions.php'); } ?>

Petitions

query($q); while($d = mysqli_fetch_array($r)){ echo "
  • EDIT $d[admin_status] $d[web_short_name] $d[web_color] $d[group_id] $d[petition_name] $d[eligibleVoterListField] $d[eligibleVoterListEquals] $d[eligibleVoterListEnforce]
  • "; } ?> query($q); $d = mysqli_fetch_array($r); ?>

    Edit Petition Setup

    Please keep whatever text you use in a word or google doc that you control, copy and paste here.

    Required 
    Web Short Name*' required>
    Web Color Background' required>
    Web Color Text' required>
    Petition Name' required>
    Petition Sign Text Box
    Petition Circulator Text Box
    eligibleVoterList Enforce
    eligibleVoterList Field' required>
    eligibleVoterList Equals
    eligibleVoterList Warning
    VoterList Signature Match Required
    Not Required 
    Signature Goal
    Landing Page Title
    Landing Page Header
    Landing Page Body
    Logo URL
    * changes may break already sent invites!

    New Petition

    web_short_name web_color petition_name