我上传了一个php文件,从数据库中提取的内容消失了

时间:2018-08-01 16:16:17

标签: php mysql forms

我正在一个网站上进行更新。我几乎没有PHP知识,但是我没有触及该代码,而是在尝试学习。我添加了一个段落,并上传了远离任何PHP的文件。从数据库中提取的内容消失了。我放回了原始文件,没有任何更改,并且该信息仍然没有出现。有人可以给我一些建议和/或指示。我真的很感谢事先提供的任何帮助。这是原始代码:

    <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta property="og:url"           content="<?=base_url().$slug; ?>" />
<meta property="og:type"          content="website" />
<meta property="og:title"         content="<?php _e($causes['nonprofit_name']); ?>- Registration Page" />
<meta property="og:description"   content='You can now support <?php _e($causes['nonprofit_name']); ?> with B-Causes. You save on every purchase while giving back to the cause you care about. Register now and start saving!' />
<meta property="og:image"         content="https://www.b-causes.com/assets/images/autibanner.jpg" />
<title>B-Causes</title>
<!-- Bootstrap Core CSS -->
<link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="<?php echo base_url(); ?>assets/css/style.css" rel="stylesheet">
<link href="<?php echo base_url(); ?>assets/images/fab.jpg" rel="shortcut icon" />
<!-- Custom Fonts -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="https://fonts.googleapis.com/css?family=Didact+Gothic" rel="stylesheet">
<!-------------------------HEADER START--------------------------->
<style>
.auti_logo {
    position: absolute;
    bottom: 10px;
    right: 20%;
}
.auti_logo img {
    height: 128px;
}
.auti_left {
    width: 100%;
    float: left;
    margin-top: -195px;
}
.auti_right {
    width: 100%;
    float: left;
}
@media(max-width:1580px) {
.auti_logo {
    right: 15%;
}
}
@media(max-width:1380px) {
.auti_logo {
    right: 10%;
}
}
@media(max-width:991px) {
.auti_logo {
    position: relative;
    bottom: 0;
    right: 0;
    width: 100%;
    float: left;
    text-align: center;
    background: #2980b8;
    padding: 15px 15px;
}
.auti_left {
    margin: 15px 0;
}
.auti_right {
    margin: 15px 0;
}
}
</style>
<?php /*?><script>
    function varifyForm(){
        if(document.getElementById('terms').checked == false){
            alert('Please Accept Terms and Conditions');
            return false;
        }else if(document.getElementById('privacy').checked == false){
            alert('Please Accept Privacy Policy');
            return false;
        }else{
            return true;
        }
    }
</script><?php */?>
</head>
<body>

<!-------------------------HEADER END---------------------------> 

<!-------------------------BANNER START--------------------------->
<div class="banner" style="position:relative;"> <img src="<?php echo base_url(); ?>assets/images/autibanner.jpg" width="100%" alt="banner">
  <div class="auti_logo"><a href=""><img src="<?php echo base_url(); ?>assets/images/logo.png" alt="banner"></a></div>
</div>

<!-------------------------BANNER END---------------------------> 

<!-------------------------BODY START--------------------------->
<div class="demo_body">
  <div class="container">
    <div class="row">
      <div class="col-md-6">
        <div class="auti_left">
          <div class="full">
            <iframe width="100%" height="315" src="<?php echo $admin_detail[0]['video_url']; ?>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
          </div>
          <div class="full" style="margin-top:15px;">
            <form method="post" onSubmit="return varifyForm()">
            <?php
                if( $this->session->flashdata('error_msg') != ''){
            ?>
            <p style="font-weight:bold; color:#F00;"><?php echo $this->session->flashdata('error_msg'); ?></p>
            <?php
                }
            ?>
            <?php
                if( $this->session->flashdata('success_msg') != ''){
            ?>
            <p style="font-weight:bold; color:#0F0;"><?php echo $this->session->flashdata('success_msg'); ?></p>
            <?php
                }
            ?>
              <div class="form-group">
                <label><strong>Name*</strong></label>
                <div class="row">
                  <div class="col-sm-6">
                    <input type="text" class="form-control" placeholder="First" style="margin-bottom:5px;" id="" name="terms[first_name]" value="" required>
                  </div>
                  <div class="col-sm-6">
                    <input type="text" class="form-control" placeholder="Last" style="margin-bottom:5px;" id="" name="terms[last_name]" value="" required>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <label><strong>Password*</strong></label>
                <div class="row">
                  <div class="col-sm-6">
                    <input type="password" class="form-control" id="" name="password" value="" placeholder="Enter Password" style="margin-bottom:5px;" required>
                  </div>
                  <div class="col-sm-6">
                    <input type="password" class="form-control" placeholder="Confirm Password" id="" name="confirm_password" value="" style="margin-bottom:5px;" required>
                  </div>
                </div>
              </div>
              <div class="form-group">
                <label><strong>Email*</strong></label>
                <input type="email" class="form-control" id="" name="terms[email]" value="" placeholder="Email" required>
              </div>
              <div class="form-group">
                <label for="sel1"><strong>User Role*</strong></label>
                <select class="form-control" id="user_role" name="terms[user_role]">
                  <option value="Member">Member</option>
                </select>
              </div>
              <div class="form-group">
                <label for="sel1"><strong>Your Cause*</strong></label>
                <select class="form-control" id="cause" name="terms[cause]">
                  <option value="<?php echo $causes['user_id']; ?>"><?php _e($causes['nonprofit_name']); ?></option>
                </select>
              </div>
              <div class="form-group">
                <label><strong>Zip Code*</strong></label>
                <input type="text" class="form-control" id="" name="terms[zip]" value="" required>
              </div>
              <div class="form-group">
                <label><strong>Terms and Conditions*</strong></label>
                <div class="checkbox-inline full">
                  <input type="checkbox" id="terms">
                  <strong>I agree to the</strong> <a href="<?=base_url() ?>termsandconditions" target="_blank"><strong>Terms and Conditions</strong></a>
                </div>
              </div>
              <button type="submit" name="btnSignUp" value="signup" class="btn btn-primary"><p style="margin:0;">SUBMIT</p></button>
            </form>
          </div>
        </div>
      </div>
      <!----- FOR FACEBOOK SHARE ---->
      <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id;
          js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.12&appId=210974212726230&autoLogAppEvents=1';
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>

  <!-- Your share button code -->
      <div class="col-md-6">
        <div class="auti_right">
          <div class="full">
              <p>Share On:</p>
              <?php /*?><a href="http://www.facebook.com/sharer.php?s=100&amp;p[title]=B-Cause&amp;p[summary]=Working Together For Good
&amp;p[url]=<?=base_url().$slug; ?>&amp;p[images][0]=https://www.b-causes.com/assets/images/autibanner.jpg" target="_blank"><img src="<?=base_url() ?>/assets/images/facebook.jpg"></a> <?php */?>
              <span data-href="<?=base_url().$slug; ?>" data-size="large" data-mobile-iframe="true"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo rawurlencode(base_url().$slug); ?>&amp;src=sdkpreparse" class="fb-xfbml-parse-ignore"><img src="<?=base_url() ?>/assets/images/facebook.jpg"></a></span>
              <a href="http://twitter.com/intent/tweet?text=<?=base_url().$slug; ?>
" target="_blank"><img src="<?=base_url() ?>/assets/images/twitter.jpg"></a> 
              <a href="https://plus.google.com/share?url=<?=base_url().$slug; ?>" target="_blank"><img src="<?=base_url() ?>/assets/images/google_plus.jpg"></a>
              <a target="_blank" title="Share on LinkedIn" href="http://www.linkedin.com/shareArticle?mini=true&url=<?=base_url().$slug; ?>"> <img src="<?=base_url() ?>/assets/images/linkedin.jpg"></a>
              <?php /*?><?php
                if($store_data['facebook'] != ''){
              ?>
                    <a href="<?php echo $store_data['facebook']; ?>" target="_blank"><img src="<?php echo base_url(); ?>assets/images/fbbtn.jpg" alt="fb" style="margin:2px;"></a> 
              <?php
                }
                if($store_data['google'] != ''){
              ?>
                    <a href="<?php echo $store_data['google']; ?>" target="_blank"><img src="<?php echo base_url(); ?>assets/images/g+btn.jpg" alt="g+" style="margin:2px;"></a>
              <?php
                }
                if($store_data['twitter'] != ''){
              ?>
                    <a href="<?php echo $store_data['twitter']; ?>" target="_blank"><img src="<?php echo base_url(); ?>assets/images/twbtn.jpg" alt="tw" style="margin:2px;"></a> 
              <?php
                }
                if($store_data['linkedin'] != ''){
              ?>
                    <a href="<?php echo $store_data['linkedin']; ?>" target="_blank"><img src="<?php echo base_url(); ?>assets/images/inbtn.jpg" alt="in" style="margin:2px;"></a> 
              <?php
                }
              ?><?php */?>
          </div>
<!-------------------------DISAPPEARS--------------------------->

        <?php if($store_data['store_logo'] != ''){ ?>
            <div class="full" align="center" style="margin:15px 0;"><img src="<?=base_url(); ?>upload/storeLogos/<?php  echo $store_data['store_logo']; ?>" alt="img" width="300px;" ></div>
       <?php } ?> 
          <div class="full" align="center" style="margin:15px 0;"><img src="<?php echo base_url(); ?>assets/images/getstartbtn.png" alt="btn"></div>
          <div class="full" align="center">
           <?php echo stripslashes($store_data['store_about']); ?>

          </div>

<!-------------------------DISAPPEARS END--------------------------->
        </div>
      </div>
    </div>
    <br>
    <footer class="footer<?php if(isset($_SESSION['sidebar-mini']) AND $_SESSION['sidebar-mini'] == 1){ ?> sidebar-mini<?php } ?>">
      <p class="no-margin" style="margin-left:20px;"> All rights reserved.<br> ©<?=date('Y') ?> B-causes |  Built By <a href="https://www.wingmanplanning.com/" target="_blank">Wingman Planning</a></p>
    </footer>
  </div>




</div>
<!-------------------------BODY END---------------------------> 

<!-------------------------JQUERY---------------------------> 

<br>
<script src="<?php echo base_url(); ?>assets/js/jquery.js"></script> 
<script src="<?php echo base_url(); ?>assets/js/bootstrap.min.js"></script> 
<!--Stiky Javascript--> 
<script>
var mainMenu = $(".navbar-inverse");
var stikyWrapper = $(".stiky-wrap");
var mainMenuHeight = mainMenu.height();
var MainMenuCurrentPos = $(".navbar-inverse").offset().top;
var windowEl = $(window);

windowEl.scroll(function(){
  var scrollPos = windowEl.scrollTop();
  if( scrollPos >= MainMenuCurrentPos ) {
    mainMenu.addClass("stiky");
    stikyWrapper.height(mainMenuHeight);
  } else {
    mainMenu.removeClass("stiky");
  }
});
</script> 
<!--Stiky Javascript--> 

<!--Scroll Javascript--> 
<script>
jQuery(document).ready(function(e) {
    e(".scroll").click(function(t) {
        t.preventDefault();
        e("html,body").animate({
            scrollTop: e(this.hash).offset().top
        }, 1e3)
    })
});
</script> 
<!--Scroll Javascript-->
</body>
</html>

0 个答案:

没有答案