-
Posts
9,409 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MadTechie
-
[SOLVED] Cannot send session cookie- headers already sent
MadTechie replied to tim101011's topic in PHP Coding Help
Line 19 is outputting to the page. this causes the problem.. so move session_start() to the start of the page.. (before line 19) -
see comments, i hope it makes sense <html> <head> <title>Registration System V0.1</title> </head> <body> <?php $first_name=$_POST["first_name"]; $surname=$_POST["surname"]; $username=$_POST["username"]; $email_address=$_POST["email_address"]; $confirm_email_address=$_POST["confirm_email_address"]; $terms_and_conditions=$_POST["terms_and_conditions"]; if ($first_name = "") { ?> <p> Please enter your desired user details, if you have problems with anything, please contact the administrator. </p> <br /> <form action="register.php" method="Post"> First Name: <input type="text" name="first_name" /> <br /> Surname: <input type="text" name="surname" /> <br /> Username: <input type="text" name="username" /> <br /> Email Address <input type="text" name="email_address" /> <br /> Confirm Email Address <input type="text" name="confirm_email_address" /> <br /> <br /> In ticking this checkbox you are agreeing to abide by the following terms and conditions <input type="checkbox" name="terms_and_conditions" /> <br /> <br /> <input type="submit" value="submit" /> </form> <?php } else { if ($first_name="") //WILL NEVER HAPPEN { $error = ("You must enter a firstname"); } if ($surname="") { $error = ("You must enter a surname"); } if ($email_address="") { $error = ("You must enter an email address"); } if ($confirm_email_address="") { $error = ("You must confim your email address"); } if ($email_address != $confirm_email_address) { $error = ("Sorry, the email addresses provided do not match"); } if ($terms_and_conditions="") { $error = ("You must agree with our terms and conditions"); } ?> Please confirm the following details <table> <tr> <td> Firstname: </td> <td> <? echo ($first_name);?> </td> </tr> <tr> <td> Surname: </td> <td> <? echo ($surname);?> </td> </tr> <tr> <td> Username: </td> <td> <? echo ($username);?> </td> </tr> <tr> <td> Email Address: </td> <td> <? echo ($email_address);?> </td> </tr> </table> If you details are correct please click submit, if they are incorrect please go back. <form action="verify.php"> <?php //erm.. what? //should be ?> <input type="text" name="first_name" value="<?php echo $first_name;?>"/> <?php // use the above as a template for the test $_POST["surname"]=$surname; $_POST["username"]=$username; $_POST["email_address"]=$email_address; $_POST["confirm_email_address"]=$confirm_email_address; $_POST["terms_and_conditions"]=$terms_and_conditions; ?> <input type="submit" name="Submit"> </form> <form action="register.php"> <?php //erm.. what? (see above) $_POST["first_name"]=$first_name; $_POST["surname"]=$surname; $_POST["username"]=$username; $_POST["email_address"]=$email_address; $_POST["confirm_email_address"]=$confirm_email_address; $_POST["terms_and_conditions"]=$terms_and_conditions; ?> <input type="submit" name="Back"> </form> <?php } ?> </body> </html>
-
Read this Backward Incompatible Changes
-
lol, when i looked that that i thought..
-
SHA256, is better than SHA1 and MD5, as MD5 has the Collision problem and SHA1 has (a kinda Collision problem), where as SHA256 doesn't (well there's no guarantee).. so yeah much better for security.. but speed.. well you can't run it from an SQL query..(who cares).. i think its a little slower that SHA1 (but i am not sure about that)..
-
http://www.md5.rednoize.com/ mjdamato, is correct and that link is just a rainbow table (which is usless to any site with salt)... the fact is if you want to be secure with MD5 then add SALT.. as for someone adding you salt to their rainbow table.. well thats easy to fix.. when the user signs up.. generate a random code.. this is their thats users own salt code.. as for a compare of one way encryptions (HASHing) Instead of saying SHA1 is a better than MD5, i'll just say that SHA1 is slower than MD5 but it generates a larger digest size that makes it stronger against brute force attacks... personally i still use MD5 with SALT (every users has their own salt)
-
[SOLVED] Security Image : PHP Could not find/open font
MadTechie replied to tim101011's topic in PHP Coding Help
nope just change //Select Font $font = "arial.ttf"; to //Select Font $font = dirname(__FILE__)."/arial.ttf"; -
$uitem_select = mysql_query("SELECT * FROM `useritems` WHERE `itemid`='$itemiid' AND `location`='Gone' GROUP BY `itemid`");
-
[SOLVED] Security Image : PHP Could not find/open font
MadTechie replied to tim101011's topic in PHP Coding Help
have you tried adding $font = dirname(__FILE__)."/arial.ttf"; to your security image code ? -
[SOLVED] Security Image : PHP Could not find/open font
MadTechie replied to tim101011's topic in PHP Coding Help
i guess you could try (for a test) <?php //Select Font $font = dirname(__FILE__)."/arial.ttf"; if(!file_exists($font)) { die("Font Missing"); } ?> -
I see it <?php $username = $_POST['username']; $username = sql_sant($username); $password = $_POST['password']; $password = sql_sant($username); //<--SURELY You MEAN $password not $Username ?>
-
[SOLVED] Security Image : PHP Could not find/open font
MadTechie replied to tim101011's topic in PHP Coding Help
$font = "arial.ttf"; either the font isn't installed on the server or its in a different place.. -
codes a little bit of a mess and with functions missing its kinda hard to workout what does what.. but from the output i would guess your not clearing an array..
-
Add the line below <?php $result = editproperty($property_id); print_r($result);//<-Add this foreach($result as $e) { $county = $e[1]; $location = $e[2]; $prop_type = $e[3]; $address = $e[16]; $price = $e[4]; $bedrooms = $e[18]; $sale_type = $e[17]; $description = $e[5]; $features = $e[6]; $accomodation = $e[7]; } if you get then check your SQL statement.. also change $result = mysql_query($sql); to $result = mysql_query($sql) or die(mysql_error());
-
that is the file.. just add the function "bb2html" to your project (or add it to a file and include it) then use as anyother function..
-
you need to update the links.., what code you having problems with..?
-
lets see <?php // A simple FAST parser to convert BBCode to HTML // Trade-in more restrictive grammar for speed and simplicty // // Syntax Sample: // -------------- // [img=http://phpfreaks.com/images/deadrats.gif] // [url="http://phpfreaks.com"]phpfreaks[/url] // [mail="webmasterphpfreaks.com"]Webmaster[/mail] // [size="25"]HUGE[/size] // [color="red"]RED[/color] // [b]bold[/b] // [i]italic[/i] // [u]underline[/u] // [list][*]item[*]item[*]item[/list] // [@code]value="123";[@/code] // [@quote]John said yadda yadda yadda[@/quote] // // Usage: // ------ // <?php include 'bb2html.php'; ?> // <?php $htmltext = bb2html($bbtext); ?> function bb2html($text) { $bbcode = array("<", ">", "[list]", "[*]", "[/list]", "[img=", "]", "[b]", "[/b]", "[u]", "[/u]", "[i]", "[/i]", '[color="', "[/color]", "[size=\"", "[/size]", '[url="', "[/url]", "[mail=\"", "[/mail]", "[@code]", "[/@code]", "[@quote]", "[/@quote]", '"]'); $htmlcode = array("<", ">", "<ul>", "<li>", "</ul>", "<img src=\"", "\">", "<b>", "</b>", "<u>", "</u>", "<i>", "</i>", "<span style=\"color:", "</span>", "<span style=\"font-size:", "</span>", '<a href="', "</a>", "<a href=\"mailto:", "</a>", "<code>", "</code>", "<table width=100% bgcolor=lightgray><tr><td bgcolor=white>", "</td></tr></table>", '">'); $newtext = str_replace($bbcode, $htmlcode, $text); $newtext = nl2br($newtext);//second pass return $newtext; } ?> got a feeling that the code and quote will mess it up... EDIT: Holy Hell, remove @ from quote and code
-
Heres a bbcode2html, as this board uses BBcode i have added @ signs to stop the parsing, your need to remove all of them.. <?php // A simple FAST parser to convert BBCode to HTML // Trade-in more restrictive grammar for speed and simplicty // // Syntax Sample: // -------------- // [@img]http://phpfreaks.com/images/deadrats.gif[@/img] // [@url="http://phpfreaks.com"]phpfreaks[@/url] // [@mail="webmasterphpfreaks.com"]Webmaster[@/mail] // [@size="25"]HUGE[@/size] // [@color="red"]RED[@/color] // [@b]bold[@/b] // [@i]italic[@/i] // [@u]underline[@/u] // [@list][*]item[*]item[*]item[@/list] // [@code]value="123";[@/code] // [@quote]John said yadda yadda yadda[@/quote] // // Usage: // ------ // <?php include 'bb2html.php'; ?> // <?php $htmltext = bb2html($bbtext); ?> function bb2html($text) { $bbcode = array("<", ">", "[@list]", "[*]", "[@/list]", "[@img]", "[@/img]", "[@b]", "[@/b]", "[@u]", "[@/u]", "[@i]", "[@/i]", '[@color="', "[@/color]", "[@size=\"", "[@/size]", '[@url="', "[@/url]", "[@mail=\"", "[@/mail]", "[@code]", "[@/code]", "[@quote]", "[@/quote]", '"]'); $htmlcode = array("<", ">", "<ul>", "<li>", "</ul>", "<img src=\"", "\">", "<b>", "</b>", "<u>", "</u>", "<i>", "</i>", "<span style=\"color:", "</span>", "<span style=\"font-size:", "</span>", '<a href="', "</a>", "<a href=\"mailto:", "</a>", "<code>", "</code>", "<table width=100% bgcolor=lightgray><tr><td bgcolor=white>", "</td></tr></table>", '">'); $newtext = str_replace($bbcode, $htmlcode, $text); $newtext = nl2br($newtext);//second pass return $newtext; } ?>
-
No it will not leave your site, and your need to fix the image links because of this..
-
it looks like your running it on more than one folder.. as for businessman332211(php.net), function.. yes it returns an array.. your just need to add something like this to the returned data sort($files); foreach($files as $f) { $t = str_replace("_","", $f); echo ' <a href="' . $f . '">' . ucfirst(substr($t, 0, -4)) . "</a><br>"; } ?>
-
Than ? for ? need more info
-
[SOLVED] [not solved!]shuffle command not working
MadTechie replied to bozebo's topic in PHP Coding Help
So much a for a useless post.. maybe darkfreaks should of just said RTFM.. -
New Exporting / Getting News From Different Server
MadTechie replied to Zepo.'s topic in PHP Coding Help
why would you have 4 neww feeds ? -
so you have put a Proxy up so your servers IP gets banned instead.. haha nice idea. not Its hardly protection.. i have created 7 system that don't replie on IP's, as proxies are freely available, and web proxies are easy trace backs..
-
I think the question, was kinda pointless.. he refers to site name being www.welcome.com and to break or explode.. so to look at the post again he might of well said also if you look in the manual, section "strings" and read the list your find "explode — Split a string by string", i don't mind helping but i have spent just under 2 days trying to resolve a problem and was very close to posting.. sometimes i know is something stupid i have done.. and a second pair of eyes help.. but this post just seams too lazy.. hence the "oh yes it is.."