Jump to content

Search the Community

Showing results for tags 'set'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 4 results

  1. Hello everyone, I'm create an application where I have member, admin, and superadmin What I'm try to do is superadmin update member to admin, so they can have more privilege. The name of the table is member where I have member, admin account, and i have row call 'rank'. Rank 1 is for member they have access basic stuff and rank 2 they have more privilege. Want the superadmin to type the name of the member and change to rank 2. This is what happening, if I dont put nothing on the text boxes, it said "Please check if you have put the right information." , if i put member and the rank i want to change is says ""User has upgrade to admin", but than when i check my database the member is still a member when i wanted to change to admin. Can anyone see where I'm going home, or what should I change. <form> </form> <form action='<?php htmlentities($_SERVER['PHP_SELF']); ?>' method='POST' enctype='multipart/form-data '> Username: <input class="fontsize" name='user' type='text'/> Rank: <input class="fontsize" name='rank' type='text' /> <br><br> <input class="button" type='submit' name='get' value='Upgrade' /> </form> </h2> <?php if(isset($_POST['get'])) { $username1 = $_POST['user']; $sql_user = mysqli_real_escape_string ($connection, $username1); $rank = $_POST['rank']; $rank = mysqli_real_escape_string ($connection, $rank); $query1 = mysqli_query($connection, "SELECT rank FROM member WHERE username='$sql_user'"); if ($row = mysqli_fetch_array($query1)) { if ($rank == '1') { $data1 = mysqli_query($connection, "UPDATE member SET rank= '1' WHERE username='sql_user'") or die (mysql_error($connection)); echo "User has downgrade to member"; } elseif ($rank == '2') { $data2 = mysqli_query($connection, "UPDATE member SET rank= '2' WHERE username ='sql_user'") or die (mysql_error($connection)); echo "User has upgrade to admin"; } else { echo "Please check if you have put the right information."; } } } ?>
  2. Hello, i need some help to change something from database if possible. Lets say this is my the table row that i want to change. | Duration | 10000 < this is 1 hour 1:00:00 < and i want to change it to this automatic and ad this ( : ) 2000 20:00 300 3:00 is that posible ? if yes can somebody explain what i need and how i can change it direcly. Or is that possible directly from database ? Thanks in advance.
  3. site http://allar.cmccd.net html <style type="text/css"> @import url("template.css"); </style> <div class="root"> <div class="header-wrap"> <div class="header"> <?php print render($page['header']); ?> </div> </div> <div class="subheader-wrap"> <div class="subheader"> <div class="nav-border-left"></div> <div class="nav-wrap"> <div class="navlink"> <?php if (isset($logo)): ?> <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo" class="logo"> <img src="<?php print $logo; ?>" alt="Jean & Tony’s Place a family website" height="50px" width="150px"/> </a> <?php endif; ?> <?php print theme('links', array('links' => $main_menu))?> </div> </div> <div class="nav-border-right"></div> </div> </div> <div class="body-wrap"> <div class="body"> <div class="content-border-left"></div> <div class="content-wrap"><?php print render($page['content']); ?></div> <div class="content-border-right"></div> </div> </div> <div class="subfooter-wrap"> <div class="subfooter"> <div class="subfooter-border-left"></div> <div class="subfooter-content-wrap"></div> <div class="subfooter-border-right"></div> </div> </div> <div class="footer-wrap"> <div class="footer"><?php print render($page['footer']); ?></div> </div> </div> css: .header-wrap, .subheader-wrap, .body-wrap, .subfooter-wrap, .footer-wrap {float:left; width:100%; clear:both; background:#000;} .header, .subheader, .nav, .body, .subfooter, .footer {width:1100px; margin:0 auto;} .body {float:none;} /* needs a height*/ .header {height:50px; width:960px;} .nav-border-left {float:left;celar:both; height:70px; width:70px; background:url(files/images/topleft-wire.png) no-repeat right;} .nav-wrap{float:left;celar:both; width:960px;height:70px;} .nav-border-right {float:left;celar:both;height:70px; width:70px; background: url(files/images/topright-wire.png) no-repeat;} .content-border-left {float:left;clear:left; height:100%; width:70px; background:url(files/images/left-wire.png) repeat-y;} .content-wrap{float:left;width:960px; color:#FFF; font-family:Lucida Grande, Verdana, sans-serif;} .content-border-right {float:left;clear:right; width:70px; background:url(files/images/right-wire.png)repeat-y;} .subfooter {height:70px;} .subfooter-border-left {float:left;celar:both; height:70px; width:70px; background:url(files/images/bottomleft-wire.png) no-repeat right;} .subfooter-content-wrap{float:left;celar:both; width:960px;height:70px; background:url(files/images/bottom-wire.png);} .subfooter-border-right {float:left;celar:both;height:70px; width:70px; background: url(files/images/bottomright-wire.png) no-repeat;} .links{margin:0;padding:0;} .navlink {} .navlink li {display:inline;} .navlink a {float:left; height:33px;font-weight:bold;line-height:32.75px; 'Times New Roman', Times, serif; font-size:16px;padding:0 25px; color:#FFF;text-align:center; border-right:1px solid #FFF;text-decoration:none; text-shadow:0px 1px 0px #185edf;} .navlink a:hover {background:url(/sites/all/themes/ssccix/files/nav-arrow.png) no-repeat center top; text-decoration:none;} .navlink a.active {background:#FFF; no-repeat center top;color:#091342;} .footer {} /*.border-left {float:left;height:100%;clear:left; width:2px; background:#fff;} .content-wrap{float:left;height:100%; width:960px; background:#555;} .border-right {float:left;height:100%;clear:right; width:2px; background:#fff;} */ The problem is that as you see the site the content is pushed to the left and the white borders on the left and right disappear, though they will show up if i have a pre-set height in the .body{} but than it will not auto height for the text. any ideas on the problem?
  4. Everything works except the cookies are not being set, any ideas?, Error reporting is that headers have already been set, I don't see it $uname = $_REQUEST["uname"]; $upass = $_REQUEST["upass"]; $ref = $_REQUEST["ref"]; $uname = str_replace("&", "'", $uname); $uname = str_replace("'", """, $uname); $uname = str_replace("\"", "\", $uname); $uname = str_replace("+", "+", $uname); $upass = str_replace("&", "'", $upass); $upass = str_replace("'", """, $upass); $upass = str_replace("\"", "\", $upass); $upass = str_replace("+", "+", $upass); If ($uname != NULL) { $username="xxxx"; $password="xxxx"; $database="xxxx"; $server="xxxx"; mysql_connect($server,$username,$password); @mysql_select_db($database) or die("Something is broken and needs fixing. Please contact us <a href=\"http://xxxx/contact..../contact.php\"> and report this</a>"); $sqlq="SELECT * FROM xxxx WHERE xxxx = '".$uname."' AND xxxx = '".$upass."' LIMIT 0,1"; $objRS = mysql_query($sqlq); while($row = mysql_fetch_array($objRS, MYSQL_ASSOC)){ $uname = $row["xxxx"]; $suid = $row["xxxx"]; $sname = $row["xxxx"]; $upass = $row["xxxxx"]; } $rows = mysql_num_rows($objRS); if (empty($rows)) { $title = "Log In"; include ("../navigation/header.php"); ?> <div id="contenti"> <div id="contwrap"> <div id="iwrap1"> <? ?> <h2> Log In Failed</h2> The username or password is incorrect, please try again <? } else { setcookie("suid",$suid, time()+14400); setcookie("aka",$sname, time()+14400); setcookie("logged","yes", time()+14400); $title = "Log In"; include ("../navigation/header.php"); ?> <div id="contenti"> <div id="contwrap"> <div id="iwrap1"> <? echo "You have succesfully logged in. <a href=\"".$ref."\">Click here to return to the previous page</a>"; } } else { header( 'Location: ../index.php' ) ; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.