peranha
Members-
Posts
878 -
Joined
-
Last visited
Everything posted by peranha
-
no, most websites will send you a new password in an email, not the original one. if they do send the original one, they may have built their own 2 way encryption so they can retrieve passwords after encrypting them.
-
[SOLVED] Backing Up To A folder With The Day's Date?
peranha replied to Cory94bailly's topic in PHP Coding Help
$date = "date('d-m-Y')"; missing the ; -
mysql_select_db($db) or die ("Sorry, that Mysql database is Invalid!"); Just like that, change the DIE message to whatever you want it to be.
-
http://en.wikipedia.org/wiki/MD5 you can read that, there are algorithms there, so if you want to figure out how to unhash it, go ahead.
-
md5 is one way encryption. There are rainbow tables out there, but if a salt is being used, they are kind of useless.
-
.maintable {border: 1px ; width: 800px; padding: 1px; background-color: navy; align: center ; margin: 2% auto 0 auto;} /*main table for forum*/ that should work, works for me. it aligns the left and right to auto which will center.
-
This is his first post, he says it outputs what he needs, he just wants it in DESC order. Which is what P2grace did.
-
if($AllInfoEntered=0){ should be if($AllInfoEntered == 0){ you want to compare, not set to 0. that is what I can see right now
-
if((strlen($hometel) == 10) and (is_numeric($hometel))){ that should work, you forgot the last ) closing the whole if statment.
-
Yes there are changes, P2grace added DESC at the end of the queries. Try what he suggested, it should work.
-
just change the number after LIMIT to what ever number you want to limit the posts returned to, and if you dont want to limit the number of posts, get rid of the LIMIT at the end, just end at rand()
-
Do you mean something like this? // create query $query = "SELECT * FROM table ORDER BY rand() LIMIT 1"; that would be for a sql database. It would select 1 random post.
-
Incorrect. Instead do this: <textarea DISABLED></textarea> What is wrong with that, it works fine and it validates with w3c, after all that is where I got if from. Just asking, not trying to get into an argument.
-
READONLY = "TRUE" Add that to the text area, or text field <textarea READONLY = "TRUE">
-
Try this, it is not correct for design, but may work <center> // table and page here. </center> I used this before, and got hit hard with negative feedback.
-
you would use join statements // create query $query = "SELECT F.facilityname, M.miscid, M.building, M.camloc, M.cammount, M.notes, M.serial, M.dateinst, C.model, C.colorbw, C.type, C.lens FROM facility_cameras FC INNER JOIN facilities F INNER JOIN cameras C INNER JOIN misc M ON FC.facilityid = F.facilityid AND FC.cameraid=C.cameraid AND FC.miscid = M.miscid ORDER BY F.facilityname, M.building, M.camloc;"; facility_cameras is a table facilities is a table cameras is a table misc is a table
-
[SOLVED] sql update not working with textarea
peranha replied to DeanWhitehouse's topic in PHP Coding Help
Where are you connecting to the database? Also, this should be at the beginning of the file. if(isset($_POST['save'])) { $update =mysql_real_escape_string($_POST['content']); $query_update = "UPDATE hayleyedit SET content = '{$update}' WHERE page_id = '{$page_id}'"; mysql_query ($query_update) or die("Error:" . mysql_error()); } -
<?php // Function to abbreviate characters after search. function truncate($string, $max_chars = 60) { if(strlen($string) > $max_chars) { $string = substr($string, 0, $max_chars).'...'; } return $string; } ?> you could use that, it will shorten to 60 characters.
-
pageid = $_GET['edit']; yeah, fixed it, didnt realize that. Working on too many things at once I guess
-
[SOLVED] Login script help, sessions won't last
peranha replied to Tandem's topic in PHP Coding Help
you need session_start() at the top of every page that you are checking sessions on. <?php session_start(); if (!isset($_SESSION['username'])) { header("Location: login.php"); //back to the login page } ?> -
This is what I use not sure if it is the correct way, but it validates with w3.org width: 1050px; margin-left: auto; margin-right: auto;
-
Download this mod, and install it under Admin and packages http://custom.simplemachines.org/mods/index.php?mod=7
-
try this $c_avg =("SELECT AVG(a_concept) FROM $tbl_name2 WHERE question_id='$id'"); Took out the quotes from the table name
-
$cavg1 = mysql_query($cavg) or die ("Error in query: $query1. ".mysql_error()); change the query line to this and see if there is any errors there The code I gave you works fine for me. and take out the echo ($c_avg1); line
-
yes, method="POST" and on the save.php page, you would use $pid = $_GET['pid']; $mynotes=$_POST['mynotes'];