
MDCode
Members-
Posts
640 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MDCode
-
Jquery -> $.post == Result Messes Up Table.
MDCode replied to notsophpfreakish's topic in Javascript Help
$.post submits data, so by doing it to registration.php and returning html, all html page will be displayed where you set it, in your case you set it to #displaycheck // submits to registration.php $.post('/registration.php', {display: display}, function(data) { // returns all html on registration.php to the div with id of displaycheck $('#displaycheck').html(data); -
I don't see the need of your header if it's jquery? To write text with jquery you can use. $('#div').append('my text');
-
Php Error - The Requested Url Was Not Found On This Server.
MDCode replied to champion's topic in Applications
The name and path is the URL -
<?php // Start the session first session_start(); // Then end it session_destroy(); ?>
-
Sorry it took so long, but here we go...please take into consideration the following quote before downloading (too many files, so it has to be provided as an attachment) Before complaining or asking question, please refer to README.txt provided in the download Basic_Login_Registration_v1.0.zip
-
It means that your login credentials are incorrect for connecting to the database. Also you want to go change your login details as google indexes these pages usually a few minutes within posting.
-
Set a cron job to run a php file that checks every 5 minutes and sends out emails
-
To break down what andy posted this basically states: if the .swf file exists, then you write your code to show it. If it does not exist but the image does, then you write your code to show that. If neither exists do whatever. Either way you will have to check which exists first before doing anything
-
You need to use mysql_query() first
-
Need Help Getting A Template Contact Form To Run
MDCode replied to NickWilliamson's topic in Third Party Scripts
No one will be able to help without showing some code. -
It's really not that complicated...change all the .jpg to .swf
-
Sorry I guess that was pretty vague...restrict by using sessions. I'm already checking that the session group on two files are that of administrator. Both require the functions.php file later on in the script. Is there any reason why I would need a session check on functions.php?
-
If a user has javascript disabled, javascript of course will not work. $sql = "SELECT `username` FROM table WHERE `username` = '$username'";
-
Is there any reason why I would need to restrict a file containing admin functions, as long as I'm checking if users who access the files that use them are of the administrator class?
-
jquery will make this a lot simpler. However if a user has javascript disabled this will make it useless to use. The $.post function in jquery is very useful if you choose to continue
-
1. Query the database 2. What happens when a user has javascript disabled?
-
I'm sure there may be a better way, but most cms and forums use this method
-
you will need an echo but yes
-
Need Help Creating User Access Level When Logging In
MDCode replied to eldan88's topic in PHP Coding Help
$query = "SELECT tablecoloumn1, tablecoloumn2 "; $query .= "FROM table "; $query .= "WHERE username = '{$username}' "; $query .= "AND hashed_password = '{$password}' "; $query .= " LIMIT 1 "; $result = mysql_query($query); confirm_query($result); if(mysql_num_rows($result) == 1) { $found_user = mysql_fetch_array($result); $_SESSION['user_id'] = $found_user['id']; $_SESSION['username'] = $found_user['usrname']; $_SESSION["access"] = $found_user['usr_access_lvl']; Take a look at how many columns you are selecting and how many sessions you are setting -
Your idea is the correct way to achieving this.
-
$sql = "SELECT * FROM table ORDER BY `id` DESC LIMIT 2";
-
Using sessions makes it much simpler, because on the protected page all you would need is: <?php session_start(); if(!isset($_SESSION['whatever'])) { header("Location: index.php"); die; } ?>
-
Going to have to change the "tomorrow" (today) that I said I would post it to possibly tomorrow or monday :-\ As you may have figured out...I'm coding it myself from scratch for my site's tutorial on basic login and registration (All user files and installation are done and 100% error, warning, and notice free) and although it's pretty basic, I suck at css and making the admin back-end neat requires css. I'm going to take a break as I've been coding this for 8 hours on and off but I'll work on it some more later.
-
<font color="blah">word</font>