Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. Line 19 is outputting to the page. this causes the problem.. so move session_start() to the start of the page.. (before line 19)
  2. 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>
  3. Read this Backward Incompatible Changes
  4. lol, when i looked that that i thought..
  5. 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)..
  6. 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)
  7. nope just change //Select Font $font = "arial.ttf"; to //Select Font $font = dirname(__FILE__)."/arial.ttf";
  8. $uitem_select = mysql_query("SELECT * FROM `useritems` WHERE `itemid`='$itemiid' AND `location`='Gone' GROUP BY `itemid`");
  9. have you tried adding $font = dirname(__FILE__)."/arial.ttf"; to your security image code ?
  10. i guess you could try (for a test) <?php //Select Font $font = dirname(__FILE__)."/arial.ttf"; if(!file_exists($font)) { die("Font Missing"); } ?>
  11. I see it <?php $username = $_POST['username']; $username = sql_sant($username); $password = $_POST['password']; $password = sql_sant($username); //<--SURELY You MEAN $password not $Username ?>
  12. $font = "arial.ttf"; either the font isn't installed on the server or its in a different place..
  13. 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..
  14. 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());
  15. 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..
  16. you need to update the links.., what code you having problems with..?
  17. 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
  18. 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; } ?>
  19. No it will not leave your site, and your need to fix the image links because of this..
  20. 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>"; } ?>
  21. Than ? for ? need more info
  22. So much a for a useless post.. maybe darkfreaks should of just said RTFM..
  23. why would you have 4 neww feeds ?
  24. 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..
  25. 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.."
×
×
  • 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.