floridaflatlander
-
Posts
671 -
Joined
-
Last visited
-
Days Won
1
Posts posted by floridaflatlander
-
-
What line number is the error on? Look at the line number and see what's wrong. Compare that to the input query
-
... only used a 5 letter word to test
That doesn't matter, md5 will make the hashed pw string 32 charters long.
If your db table is only allowing 30 or less charactors it's cutting 2 off.
-
$q = "SELECT id FROM users WHERE email='$e'"; $r = mysqli_query ($dbc, $q); if (mysqli_num_rows($r) == 0) { // Available. run insert } else{ echo this email is taken}
Also and this is a big also you need to clean/secure your data before you put it in the db table.
-
Before the INSERT do a SELECT that looks for one or more of something, ie an username, email, location or all or more.
-
...... but still not being able to find it from the table?
What does this mean? How big is your table? If it is big can you use phpmyadmin to look up the username to view the hashed password to see if they match.
This is good but do this later, first thing first.
Not to mention, I strongly recommend reading the following article, and reading it until you understand it fully:
http://www.openwall.com/articles/PHP-Users-Passwords
-
I think session_register is deprecated. Use $_SESSION['thing'] = 'thing';
Also why put the password in a session?
And what Drongo_III said.
Are you quite sure your password is actually stored as an MD5? -
What I'm looking for is let say if my visitor is from US the it will go to the default
I'd kind like to know how to do that too.
-
agrd
Argh, I think it's argh
anyway back to business ...
... or have font tags that are the same type font as you'll be using with a line height.
I guess that's all BuildMyWeb and I can add to the buffet.
-
Off hand I say add height or min height to the div or have font tags that are the same type font as you'll be using with a line height.
-
Are all your sessions in the $_SESSION array so this works $_SESSION = array(); ?
What session is left?
-
Hmm.. I would actually recommend against using absolute paths, as they tend to make it more difficult to transport scripts between systems.
If you have a relative path, and move servers, you don't have to do anything. Seeing as the path structure is the same within the scope of the page, but the path outside of your web root will (most likely) be completely different. You might have to adjust the URL between sites, but that's also true for absolute paths in that case.
.... so I changed it to "$home/member/index.php" And $home depending on if I was on my computer or online.
$home can change and alllows for an absolute path change
-
Yeah, I don't do I like that so you're going to have to play with it.
Try
echo "<p>".htmlspecialchars($radio_info['now_playing']['artist'] . ' - ' . $radio_info['now_playing']['track'])."</p>";
echo "<p>".htmlspecialchars($radio_info['listeners'])."</p>";
-
Well the above should work, about a year ago I had my redirect as
header("Location: ../member/index.php"); // or what ever
exit();
and was told by the powers here to have a absolute paths in my redirects so I changed it to "$home/member/index.php" And $home depending on if I was on my computer or online.
-
Hey I just saw your echo, why the echo if you want to redirect?
-
so here is my code:
<?php if(!isset($_POST['submit'])) { $ToEmail = '[email protected]'; $EmailSubject = 'Pitanje sa ndnea.com'; $mailheader = "From :". $_POST["email"]. "\r\n"; $mailheader .= "Reply to :". $_POST["email"]. "\r\n"; $mailheader .= "Ova poruka sadrzi pitanje postavljeno na www.ndnea.com \r\n"; $MESSAGE_BODY = "Ime : " .$_POST["name"]." \r\n"; $MESSAGE_BODY .= "Email : " .nl2br($_POST["email"])." \r\n"; $MESSAGE_BODY .= "Naslov : " .$_POST["subject"]." \r\n"; $MESSAGE_BODY .= "Poruka : " .nl2br($_POST["feedback"])." \r\n"; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); echo "Vasa poruka je uspjesno poslana! Kliknite <a href=\"index.html\">ovde</a> za pocetnu stranu "; header("Location: $home/member/index.php"); // or what ever exit(); }; ?>
-
Try
echo "<p>htmlspecialchars($radio_info['now_playing']['artist'] . ' - ' . $radio_info['now_playing']['track'])</p>";
echo "<p>htmlspecialchars($radio_info['listeners'])</p>";
-
Yeah i figured but..theres no html element or anything...
what does the echo print/return?
-
Just like you'd create for any other html output.
-
Just for a heads up I was suggesting to register on sreach engines to let them know you're there quicker not for SEO.
-
I wouldn't think so in the long run, use googles web master tools to register your web site. Then register on other search engines. http://www.wordsinarow.com/search-engines.html
Do you want english or spanish speaking people at your site?
-
Yeah if signed in display the thank you, if not display the form.
-
I then want to hide the form once submitted and show a response message of 'thank you for contacting us', how would I achieve this using this new method as the form code would always be hard coded into the html page?
use an if() condition
-
php processes from top to bottom.
I'd do something like this but it probably has some errors
<?php require_once('_coreFunctions.php'); // this is where DB functions are e.g. connection etc require_once('_signInFunctions.php'); $displayForm = true; $error = ""; $username = ""; if(isset($_POST['signInSubmit'])) { $username = mysqli_real_escape_string(cf_dbConnect(), $_POST['username']); $password = mysqli_real_escape_string(cf_dbConnect(), $_POST['password']); $query = mysqli_query(cf_dbConnect(), "call sp_checkLoginDetails('{$username}', '{$password}')"); if(mysqli_num_rows($query) == 1) { $_SESSION['isLoggedIn'] = true; while($row = mysqli_fetch_object($query)) { $_SESSION['firstName'] = $row->firstName; } mysqli_query(cf_dbConnect(), "call sp_updateLoginDateTime('{$_SESSION['firstName']}')"); header("Location: ."); // this is my redirect part } else { $error = "<div id=\"formMessages\">Username or Password is incorrect. Please try again.</div>"; if($username == "username...") { $username = ""; } } } require_once('header.php'); // this has HTML inside of it e.g. head tag etc ?> <div id="contentBoxWrapper"> <div id="contentBoxTop"> <div id="contentBoxTopInner"><a href="/" class="firstLink">Home</a> <span class="breadcrumbDivider">></span> Sign In<hr /></div> </div> <div id="contentBoxContent"> <div id="signInFormWrapper"> <h1>Sign In</h1> <?php if (isset($error)) {echo $error;} ?> <form name=\"signInForm\" id=\"signInForm\" method=\"post\" action=\"\"> <label for=\"username\">Username:</label><br /> <input type=\"text\" name=\"username\" id=\"signInFormUsername\" class=\"formField\" value=\"{$username}\" /><br /><br /> <label for=\"password\">Password:</label><br /> <input type=\"password\" name=\"password\" id=\"signInFormPassword\" class=\"formField\" /><br /><br /> <input type=\"submit\" id=\"signInSubmit\" name=\"signInSubmit\" value=\"Login\" /> </form> <br /> <a href="resetpassword">Forgotten password?</a> </div> </div> <div id="contentBoxBottom"></div> </div> <?php require_once('footer.php'); ?>
-
What do you have now?
PS. You haven't played with it much, I made my last post 55+- minutes ago.
Problems Converting WAMP Site From Localhost To Domain
in Other Web Server Software
Posted
This may help and it's how I do it
Then links are echo '<a href="$home">Home</a>'; or what ever.
Like ChristianF said there should be almost no difference.
With the above I can move files back and forth with no problem.