Connection Dreamweaver code problem
Hello
I created a page called login.php and added a form
until now so normal...
I then added a behavior for the user of the connection from the side panel.
<? PHP
Validate request to connect to this site.
If (! isset {})
session_start();
}
$loginFormAction = $_SERVER ['PHP_SELF'];
If (isset($_GET['accesscheck'])) {}
$_SESSION ['PrevUrl'] = $_GET ['accesscheck"];
}
If (isset($_POST['email_address'])) {}
$loginUsername = $_POST ['email_address'];
$password = $_POST ['pass'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "home.php"
$MM_redirectLoginFailed = 'login.php ';
$MM_redirecttoReferrer = true;
@mysql_select_db ($database_db, $db);
$LoginRS__query = sprintf ("SELECT email, password from users WHERE email = %s AND password = %s",
GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "text"));
$LoginRS = mysql_query ($LoginRS__query, $db) or die (mysql_error ());
$loginFoundUser = mysql_num_rows ($LoginRS);
If {($loginFoundUser)
$loginStrGroup = "";
Declare two session variables and assign them
$_SESSION ['MM_Username"] = $loginUsername;
$_SESSION ["MM_UserGroup"] = $loginStrGroup;
If (isset($_SESSION['PrevUrl']) & & true) {}
$MM_redirectLoginSuccess = $_SESSION ["PrevUrl"];
}
Header ("Location:".) $MM_redirectLoginSuccess);
}
else {}
Header ("Location:".) $MM_redirectLoginFailed);
}
}
? >
I want to use the previous url also redirect, but it does not work either.
I can see the url in the address bar
Login.php? AccessCheck=%2FFolder%2Fsite%2Fhome.php
I don't understand why his does not work, I have another mini connection which works fine. I thought that it only worked because of the previous url option, but which to disable the form still does not work.
The database is correct also.
Help :'(
Just a guess, but I see that the value of accesscheck contains URL encoded values. Try to change this:
if (isset($_GET['accesscheck'])) { $_SESSION['PrevUrl'] = $_GET['accesscheck']; }
to do this:
if (isset($_GET['accesscheck'])) { $_SESSION['PrevUrl'] = urldecode($_GET['accesscheck']); }
Tags: Dreamweaver
Similar Questions
-
Problem: connect Dreamweaver CC to a local MySQL database
Nice day
I use Dreamweaver CC to create a dynamic site, on a Mac (but I had the same problem when I tried on Windows), with MAMP as a local server Apache with MySQL.
the main folder of my site is .../htdocs/mysite/ so in the server settings, I set myself as follows:
And this is a job for the live preview.
BUT
When I try to connect Dreamweaver to MySQL, it seems that the error:
If you ask, MAMP use 8888 for Apache http and 8889 for mysql. I can change these for 80 and 3306 by default (and write only 'localhost'), but I have the same problem. Infact if dreamweaver did not find a connection message speaks of a 404 error, so I don't think that the problem is on the configuration of the port.
In another post, I found on the internet about this, someone said that it is a problem between different versions of php or mysql in dreamweaver and MAMP. But I have the same problem on windows with XAMPP.
Can you help me?
Thank you!
This PHP: mysql_pconnect - manual should answer your question.
In case you do not understand, the said function is not valid for PHP version 7. If you install PHP version 5.4, you won't a problem except on the track when PHP7 becomes public.
-
Internet GUIDE DOWNLOAD ERROR connection failed (Code: 13)
original title: GUIDE DOWNLOAD ERROR IN VISTA___ WINDOWS error MESSAGE: the Guide could not be downloaded for the following reason: the Internet connection failure (Code: 13)
DOWNLOAD THE GUIDE IN WINDOWS VISTA ERROR
The Guide ERROR MESSAGE could not be downloaded for the following reason: the Internet connection failure (Code: 13)
I'VE BEEN STRUGGLING WITH THIS PROBLEM FOR ABOUT SIX WEEKS NOW WITH NO GOOD RESULT. I TRIED ALL THAT I SAW DISPLAYED (WHICH SEEMED LOGICAL) AND HAVE SPENT DOZENS OF HOURS TRYING TO SOLVE THIS PROBLEM. I WENT AS SUGGESTED EXTREME AS TO REINSTALL THE OPERATING SYSTEM OF THE GENIUSES AT HP WHO GAVE ME NOTHING, BUT MANY MORE HOURS OF PROBLEMS ALL STRAIGHTENED OUT AGAIN. CAN SOMEONE HELP ME WITH THIS PROBLEM SO I CAN REUSE MY WINDOWS MEDIA CENTER TV? ALSO IT ONLY Y HAS NO PROBLEM WITH MY CONNECTION CABLE OR THE ACE OF TV TUNER YOU CAN WATCH "LIVE TV" WITHOUT PROBLEM. AND I OBVIOUSLY DON'T HAVE AN ACE OF INTERNET PROBLEM I GOT HERE
The COMPUTER THAT I GOT IS a HP PAVILION MEDIA CENTER TV m7750n PC I DO NOT KNOW what IS THE MODEL NUMBER OF THE TV TUNER CARD. ALSO, I CONTACTED THE PROVIDER OF CABLE SERVICES, AND THEY DON'T KNOW ANYTHING ABOUT LISTS "GUIDE" WHERE THEY COME OR ANYTHING ON THEM ALL, THEY CAN ME SAY IS THAT I DO NOT SUBSCRIBE TO THE INTERNET SERVICE OF THIER AND THEY CAN'T HELP ME.
LOOKING IN THE DEVICE MANAGER, I FOUND THE FOLLOWING WHICH I THINK MAY BE THE TV TUNER CARD?
IT IS Hauppauge WinTV HVR-1600 NTSC/ATSC Combo?
AS I SAID BEFORE THAT I DON'T THINK THAT THERE IS A PROBLEM WITH THE TV CARD, YOU CAN VIEW 'LIVE TV' BUT YOU CAN'T GET THE GUIDE FOR ANY INFORMATION ON THIS TOPIC.
ALSO I'M RUNNING WINDOWS VISTA HOME PREMIUM 32
THE GUIDE LISTS TV COME ON DIRECTLY FROM AN INTERNET SERVER ACCESSIBLE TO THE ENTIRE WORLD OR JUST WHERE THEY COME FROM AND HOW A PERSON WOULD FIND IT?
AN ANOTHER LITTLE TID BIT OF INFO. I CONNECT TO THE INTERNET VIA AOL AND A DIAL-UP ACCESS.
Here is an article about this problem with some suggestions that may help: http://blogs.msdn.com/b/astebner/archive/2006/02/06/526231.aspx.
Here is a thread addressing the same problem with the two proposed solutions you can try:http://social.answers.microsoft.com/Forums/en-US/vistaprograms/thread/9225d1c5-e547-45b0-8fb2-42f9ff5f046a.
If this does not work, then I suggest that repost you your question in the Windows Live Media Center Discussion Group at:http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.windows.mediacenter where experts in this program will be happy to help you.
I hope this helps.
Good luck!
Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.
-
DREAMWEAVER-SITEGROUND PROBLEM
Hello.
I have a problem like this, I need to connect Dreamweaver (version on CS6) with a site placed on the Site Server to the ground.
Can anyone give me some suggestions to connect to the server of the Web site with Dreamweaver?
I expect an answer if possible.
Best regards.
Your connection to the server belongs to "Set" your site in Site Manager.
Enter your log in username and password in the section "at a distance", .along with the name of the folder they tell you to download on (commonly public_html).
If you have lost this information, call the ground at 1.866.605.2484 Site.
If you are in Europe, they have problems
Widespread throughout Europe may be connectivity problem be affecting SiteGround customers
-
Dreamweaver CS3 - problem with FTP.
Dreamweaver CS3 problem (version 9.0 build 53)-with FTP. I took my host FTP connection settings and try to put them in Dreamweaver - it download my site only partially. If I use the same settings on FileZilla FTP - it download the site as intended. What is the problem with my Dreamweaver FTP?
Sorry for my English.
Thank you for your attention.
Nikolai
Dreamweaver CS3 is a very old program. 8 full behind versions. It is likely that the DW FTP is obsolete and does not support connections to the host.
-
Insert a file .swf by Dreamweaver validation problem
Insert a file .swf by Dreamweaver validation problem. I tried this code for html5, but I can't make it work for firefox.
< object data = "path_to_file/file.swf" type = "application/x-shockwave-flash" width = "insert_width_of_movie" height = "insert_height_of_movie" > "
< param name = "movie" value = "path_to_file/file.swf" >
< param name = "SomeOtherParam" value = "ParamValue" >
< / object >
Try:
<>
Type = "application/x-shockwave-flash" data = "images/homewebpageflash.swf"
width = "500" height = "375" >
-
Satellite C660 - connection Wi - Fi problems
Hello
I have the Satellite C660 with windows 7 64 bit which continually lost the wifi connection. The problem has been compounded in recent weeks. It takes the point a is the only one to connect with a network cable.
I updated the driver for the current version 1005.23.622.2011 without success. All our other laptop have no problem with the wifi connection.Can someone help with this problem of frustasting before I go out a buy a wireless dongle?
Wayne
Hello
Have you noticed this problem with an adapter connected to your laptop computer or power supply battery only?
-
I installed AVG 9.0 and now I get the MSN Explorer pop next message.
You can not connect to your mail server. There may be a problem with your Internet connection, or a problem with the mail server. Pleas try again.Sure. Analysis of your e-mail anti-virus program:
- Can slow to receive and send messages, or even fail.
- Can damage files of storage for messages that you've already sent and received, making it inaccessible messages.
- Is not necessary. If you receive an infected attachment and try to open it, the protective device in real time of your antivirus program will block the infection.
Here are a few web pages accurately:
Why you don't need your anti-virus program to scan your e-mail
The other threat email: the Corruption of files in Outlook Express
Why some antivirus software can change the settings in e-mail programs
Email scanning - advantages and disadvantages -
My Windows Live Messenger cannot connect, error code 800488EBB
Hello people of Microsoft or Windows 7... Where are you? My messenger cannot connect, error code 800488EBB... Please help... fixed time (the time of the window does not work)... It is the damaged operating system? How to do?
original title: error 800488EB...!Hello
The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:
Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums at www.windowslivehelp.com.
-
I get this error when you try to create a data store for Oracle database of the Disqualification.
ORA-12505, TNS: Listener does not currently of SID in the connection descriptor (code: 2 011)
I am able to connect to this database by using the same credentials through SQL, but the Disqualification, I'm not. Do I need to do anything in linux server before the implementation of Oracle data warehouses?
Thank you
Ravi
There are a number of ways.
1 use a JNDI connection configured in WebLogic and select by name
2. use the LDAP connection or TNS - see http://docs.oracle.com/middleware/1213/edq/DQEXT/config_dbase.htm#DQEXT202
3. Add an oracle.xml file in [local disqualification home] / dbconnectors with the following content. This will allow you to select the service name in the standard Oracle data store wizard:
Class = "com.datanomic.utils.databasespecies.species.Oracle"
MaxNameLength = "30" invalidnamechars ="" ' >
{JDBC:Oracle:Thin:@${service = "srv"? /': "} ${host}: ${port} {service ="srv"? '/' : ':'}${sid} Oracle {JDBC:Oracle:Thin:@${service = "srv"? /': "} ${host}: ${port} {service ="srv"? '/' : ':'}${sid} ${superior (schema = "? user: schema)} dbproductname ~ = '(?i) oracle' name ~ = ' $BIN\\ [A-Za-z0-9 + /] {22, 24} ==------$\\p {digit} +' user = ${user}
password = ${password}
FetchSize = 100
BatchSize = ${export.batchsize}
void = TRUNCATE TABLE %s
ALTER SESSION SET CURRENT_SCHEMA = ${schema} 1521 -
How can I connect Dreamweaver to MySQL?
I am trying to connect Dreamweaver to MySQL. I have my downloaded datatbase. The instructions I'm following say click on the + button at the top left of the databases, control panel and choose MySQL connection. I see not all + all over my screen. The instructions may be for MAM Pro that I did not. How can I connect when I could not find the connection menu? I'm on a Mac. Thanks for any help.
Hello
Try following this tutorial - http://www.webassist.com/support/documentation/how-tos/creating_db_connection.php.
The + button is displayed in the image of 'connect to your database' article tutorial, (top left).
PZ
-
Dreamweaver had problems during the construction of the current menus.xml file menus
So, after having trouble with my Photoshop scratch disk, I had to do an archive and install of my OS 10.6.1 and then reinstall the suite Adobe. then I had to run the repair of the license utility (http://www.adobe.com/support/contact/licensing.html).
Now everything works but Dreamweaver, which is throwing the following error message:
"Dreamweaver had problems during the construction of the current menus.xml file menus.
If please remove the current menus.xml file and rename menus.bak menus.xml.
I tried. menus.bak is a directory, not a file. Even renaming the directory did not work.
I saw this http://forums.Adobe.com/message/2188511#2188511
but I do not have a directory/FlashPlayerTrust /, nor do I see what that has to do with Dreamweaver.
I could not find a corresponding solution to this http://forums.Adobe.com/message/862339#862339 for Mac OS.
Ce http://forums.Adobe.com/message/3396334#3396334 did not help, either.
Anyone have any ideas?
Thank you!
I got this same error this morning when I tried to open Dreamweaver CS5 (any type of document have been found in the...). I'm on a PC. There was very little posts about it so I thought I'd post what worked for me. It must have been a day or something by Akamai.
I went to C:\Program Files (x 86) \Adobe\Adobe Dreamweaver CS5\configuration\DocumentTypes and open MMDocumentTypes.xml in Notepad ++. There were about 100 lines of NULL in the configuration of Akamai, so I deleted all the information between the
-
View Dreamweaver code letter spacing problem
Hi all
This morning when I started DreamWeaver I saw something change.
As you can see in the image below in mode code, the letters spacing is became really larger than normal.
In the image below, I made a piece of code with my dreamweaver upstairs and downstairs with one of my friends.
When I try to change the font in the Preferences menu (Verdana, for example) seems to fix the problem but when I change again on new mail the problem come back.
What can I do?
For me, it's really frustrating to work with this problem and I do not understand why it bothers me so much,
Thanks for the help guyes!Manual.
I have never talk on a dash problem, but on a letter spacing problem I solved by applying a restoration of the system configuration.
No one knows the reason for this problem?
-
Error HTTP 404 with Dreamweaver code
Hello
Can anyone understand this?
HTTP 404 File not found error code. Here are a few possible reasons for the problem:
(1) there is no server running on the server test. (2) the testing server specified for this site is not mapped to the URL http://www.explainervideocost.com/_mmServerScripts/MMHTTPDB.php . Check that the URL prefix corresponds to the root of the site.
I can't get any further to connect to my xampp server and mySQL database.
Dreamweaver seems to be the only one having problems. It is not the host of the site or the MySQL database. Is Dreamweaver. I tried this in CS5.5 and CS6 and get the same error message in both. What should I do? How can I solve this problem? Site Ref: EAPN video cost
Thank you
-Steve
A local test server should point to your localhost, not in the domain of your Web site. See screenshots.
Your settings will look like this:
Test server
Local/network
C:\xampp\htdocs\yourSiteName
Advanced:
Final:
All that being said, you should not use DW with a WordPress site, except to change a child theme. And for that we need good coding in PHP, HTML and CSS skills. More practical knowledge of how WP Themes work and how to modify them properly so not to break the site.
Nancy O.
-
HELLO DREAMWEAVER GENIUS!
I'm developing a dreamweaver login page where a user can be connect on my Member restricted using his username and password page.
The problem now is that I want to count the number of each user login in my database. I have already created a table column called 'login_no' in the table of my database.
I want the 'login_no' colum to count the total number of connections of each user in my restricted page.
PLEASE HELP ME!
See my code below:
code page of connection form.
<? php require_once('Connections/myconn.php');? >
<? PHP
If (! function_exists ("GetSQLValueString")) {}
function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
If (via PHP_VERSION < 6) {}
$theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;
}
$theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);
Switch ($theType) {}
case 'text ':
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "long":
case "int":
$theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';
break;
case "double":
$theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';
break;
case "date":
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "set":
$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
break;
}
Return $theValue;
}
}
? >
<? PHP
Validate request to connect to this site.
If (! isset {})
session_start();
}
$loginFormAction = $_SERVER ['PHP_SELF'];
If (isset($_GET['accesscheck'])) {}
$_SESSION ['PrevUrl'] = $_GET ['accesscheck"];
}
If (isset($_POST['username'])) {}
$loginUsername = $_POST ['username'];
$password = $_POST ["password"];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "mmember.php";
$MM_redirectLoginFailed = "loginfail.php";
$MM_redirecttoReferrer = false;
@mysql_select_db ($database_myconn, $myconn);
$LoginRS__query = sprintf ("SELECT username, password FROM regtable WHERE username = %s AND password is %s",
GetSQLValueString ($loginUsername, "text"), GetSQLValueString ($password, "text"));
$LoginRS = mysql_query ($LoginRS__query, $myconn) or die (mysql_error ());
$loginFoundUser = mysql_num_rows ($LoginRS);
If {($loginFoundUser)
$loginStrGroup = "";
If (via PHP_VERSION > = 5.1) {session_regenerate_id (true) ;} else {session_regenerate_id() ;}
Declare two session variables and assign them
$_SESSION ['MM_Username"] = $loginUsername;
$_SESSION ["MM_UserGroup"] = $loginStrGroup;
If (isset($_SESSION['PrevUrl']) & & false) {}
$MM_redirectLoginSuccess = $_SESSION ["PrevUrl"];
}
Header ("Location:".) $MM_redirectLoginSuccess);
}
else {}
Header ("Location:".) $MM_redirectLoginFailed);
}
}
? >
< ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
" < html xmlns =" http://www.w3.org/1999/xhtml ">
< head >
< meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
< title > welcome! < /title >
< style type = "text/css" >
#header {}
background-color: #66CCFF;
height: 124px;
Width: 100%;
margin-bottom: 15px;
}
{#INSIDEE}
height: 80px;
Width: 1000px;
margin-right: auto;
left margin: auto;
}
{#newlogo}
float: left;
height: 124px;
Width: 580px;
text-align: left;
}
#name {}
Width: 100px;
float: left;
}
{#menu}
background-color: #DB5238;
height: auto;
Width: 100%;
margin-bottom: 60px banner;
}
{#marq}
height: 40px;
Width: 900px;
margin-right: auto;
left margin: auto;
margin-bottom: 8px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: dotted;
border-right-style: dotted;
border-bottom-style: dotted;
border-left-style: dotted;
}
{#INNNNN}
height: auto;
Width: 1000px;
margin-right: auto;
left margin: auto;
}
{body
background-color: #F0F0F0;
}
{#wrapper}
Width: 1000px;
height: 380px;
margin-bottom: 40px;
margin-right: auto;
left margin: auto;
do-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
text-align: center;
do-size: 14px;
}
#L {}
float: left;
height: 150px;
Width: 300px;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: dotted;
border-right-style: dotted;
border-bottom-style: dotted;
border-left-style: dotted;
}
{#M}
height: 150px;
Width: 290px;
float: left;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: dotted;
border-right-style: dotted;
border-bottom-style: dotted;
border-left-style: dotted;
text-align: center;
}
#R {}
float: right;
height: 150px;
Width: 300px;
text-align: center;
}
#logo {}
}
{#subfooter}
Width: 1000px;
margin-right: auto;
left margin: auto;
height: 150px;
Clear: both;
border-top-width: 10px;
border-top-style: ridge;
border-right-width: thin;
border-bottom-width: thin;
border-left-width: thin;
border-right-style: dotted;
border-bottom-style: dotted;
border-left-style: dotted;
}
{#fotter}
Width: 100%;
background-color: #66CCFF;
text-align: center;
}
#logo {}
Width: 90px;
margin left: 200px;
float: left;
}
{#wa}
-WebKit-border - image: URL (Line2.png) 20 30 35 29 stretch;
-moz - border - image: URL (Line2.png) 20 stretch;
border - image: URL (Line2.png) 20 stretch;
Width: 58%;
height: auto;
float: left;
do-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
do-size: 14px;
margin-bottom: 20px;
border-top-width: 10px;
border-bottom-width: 0px;
}
{#wb}
Width: auto;
height: auto;
text-align: center;
margin-right: auto;
left margin: auto;
padding-top: 10px;
padding-right: 20px;
padding-bottom: 10px;
padding-left: 20px;
border: 1px inset #999.
background-color: #FFF;
}
#wrapper #wb table {}
do-size: 12px;
}
{#UP}
height: 198px;
Width: 390px;
border-bottom-width: 1px;
border-bottom-style: dashed;
border-top-width: 1px;
border-right-width: 1px;
border-left-width: 1px;
border-top-style: dashed;
border-right-style: dashed;
border-left-style: dashed;
text-decoration: none;
}
{#dowm}
height: auto;
Width: 390px;
border-bottom-width: 1px;
border-bottom-style: outset;
border-top-width: 1px;
border-top-style: outset;
border-right-width: 1px;
border-right-style: outset;
border-left-width: 1px;
border-left-style: outset;
border-radius: 20px;
-webkit-box-shadow: 0 20px 35px #777;
-moz-box-shadow: 0 20px 35px #777;
box-shadow: 0 20px 35px #777;
border: 2px solid black;
}
{#newname}
float: left;
height: 80px;
Width: 370px;
}
{#CONTACTT}
float: right;
height: 128px.
Width: 400 PX;
text-align: center;
}
< / style >
< link rel = "stylesheet" href='menus/138/menu138id14_style.css type = "text/css" / >
< link rel = "stylesheet" href='menus/138/menu138id9_style.css type = "text/css" / >
< / head >
< body >
< div id = 'wrapper' >
< style p = "do-family:"Trebuchet MS", Arial, Helvetica, without serif;" make-weight: bold; make-style: italic; do-size: 14px; "> WELCOME! Please LOGIN TO ACCESS. < /p >
< p > < / p >
< table width = "410" height = "46" border = "0" align = "center" >
< b >
< th bgcolor = '#F0F0F0' scope = "row" > < span style = "do-family:"Trebuchet MS", Arial, Helvetica, without serif;" do-size: 14px "> < /th > </span > LOGIN FORM"
< /tr >
< /table >
< br / >
< form id = "form1" name = "form1" method = "POST" action = "<?" PHP echo $loginFormAction;? > ">"
< table width = "410" border = "0" align = "center" cellpadding = "10" cellspacing = "2" >
< b >
< th width = "228" bgcolor = '#EAEAEA' scope = "row" > username < /th >
< th width = "326" align = "left" bgcolor = '#EAEAEA' scope = "row" > < label for = "username" > < / label >
< input type = "text" name = "user name" id = "username" / > < /th >
< /tr >
< b >
< th bgcolor = '#EAEAEA' scope = "row" > password < /th >
< th align = "left" bgcolor = '#EAEAEA' scope = "row" > < input type = "text" name = "password" id = "password" / > < /th >
< /tr >
< b >
< th bgcolor = '#EAEAEA' scope = "row" > < /th >
< th align = "left" bgcolor = '#EAEAEA' scope = "row" > < input name = "button" = "submit" id = "button" value = "LOGIN" / > < /th >
< /tr >
< /table >
< / make >
<p> </p>
< p > < / p >
< p > < / p >
< p > < / p >
< / div >
< div id = "fotter" >
< p > Copyright @ 2015 < /p >
< / div >
< / body >
< / html >
my page code Member restricted.
<? php require_once('Connections/myconn.php');? >
<? PHP
initialize the session
If (! isset {})
session_start();
}
* Log out the current user. **
$logoutAction = $_SERVER ['PHP_SELF']. » ? doLogout = true;
If ((isset & & ($_SERVER ['QUERY_STRING']! = "")) {})
$logoutAction. = '& '. htmlentities($_SERVER['QUERY_STRING']);
}
{If ((isset($_GET['doLogout'])) & & ($ {_GET ['doLogout'] == "true"))}
to completely disconnect a visitor, you must delete the session varialbles
$_SESSION ['MM_Username'] = NULL;
$_SESSION ['MM_UserGroup'] = NULL;
$_SESSION ['PrevUrl'] = NULL;
unset($_SESSION['MM_Username']);
unset($_SESSION['MM_UserGroup']);
unset($_SESSION['PrevUrl']);
$logoutGoTo = "mlogin.php";
If {($logoutGoTo)
Header ("Location: $logoutGoTo");
"exit";
}
}
? >
<? PHP
If (! isset {})
session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
Restrict access to Page: grant or deny access to this page
Function isAuthorized ($strUsers, $UserGroup, $strGroups, $UserName) {}
For safety, first assuming that the visitor is NOT allowed.
$isValid = false;
When a visitor is connected to this site, the MM_Username of Session variable value equal to their username.
So, we know that a user is NOT logged if this Session variable is empty.
If (! empty ($UserName)) {}
In addition to being connected, you can restrict access to only certain users based on a created ID when they connect.
Analyze the channels in the tables.
$arrUsers = explode (",", $strUsers);
$arrGroups = explode (",", $strGroups);
If (in_array ($UserName, $arrUsers)) {}
$isValid = true;
}
Or, you can restrict access to only certain users based on their user name.
If (in_array ($UserGroup, $arrGroups)) {}
$isValid = true;
}
If (($strUsers == "") & & true) {}
$isValid = true;
}
}
return $isValid;
}
$MM_restrictGoTo = "mlogin.php";
If (!) {(((isset($_SESSION['MM_Username']))) & & (isAuthorized ("", $MM_authorizedUsers, $_SESSION ['MM_Username'], {$_SESSION ['MM_UserGroup']})))}
$MM_qsChar = ';?
$MM_referrer = $_SERVER ['PHP_SELF'];
If (strpos ($MM_restrictGoTo, "?")) $MM_qsChar = "&";
If (isset($_SERVER['QUERY_STRING']) & & strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer. = « ? ». $_SERVER ['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar. "accesscheck =". UrlEncode ($MM_referrer);
Header ("Location:".) $MM_restrictGoTo);
"exit";
}
? >
<? PHP
If (! function_exists ("GetSQLValueString")) {}
function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
If (via PHP_VERSION < 6) {}
$theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;
}
$theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);
Switch ($theType) {}
case 'text ':
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "long":
case "int":
$theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';
break;
case "double":
$theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';
break;
case "date":
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "set":
$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
break;
}
Return $theValue;
}
}
$colname_Recordset1 = "-1";
If (isset($_SESSION['MM_Username'])) {}
$colname_Recordset1 = $_SESSION ['MM_Username"];
}
@mysql_select_db ($database_myconn, $myconn);
$query_Recordset1 = sprintf ("" SELECT * FROM reg WHERE username = %s ", GetSQLValueString ($colname_Recordset1,"text")");
$Recordset1 = mysql_query ($query_Recordset1, $myconn) or die (mysql_error ());
$row_Recordset1 = mysql_fetch_assoc ($Recordset1);
$totalRows_Recordset1 = mysql_num_rows ($Recordset1);
$colname_Recordset1 = "-1";
If (isset($_SESSION['MM_Username'])) {}
$colname_Recordset1 = $_SESSION ['MM_Username"];
}
@mysql_select_db ($database_myconn, $myconn);
$query_Recordset1 = sprintf ("" SELECT * FROM regtable WHERE username = %s ", GetSQLValueString ($colname_Recordset1,"text")");
$Recordset1 = mysql_query ($query_Recordset1, $myconn) or die (mysql_error ());
$row_Recordset1 = mysql_fetch_assoc ($Recordset1);
? >
< ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
" < html xmlns =" http://www.w3.org/1999/xhtml ">
< head >
< meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
< title > Untitled Document < /title >
< style type = "text/css" >
body, td, th {}
do-size: 16px;
}
< / style >
< / head >
< body >
< style p = "font size: 18px" > welcome < span style = "make weight:" BOLD "" > <? PHP echo $row_Recordset1 ['username'];? > < / span > to our Member page!
you just connect now. < /p >
< p > < / p >
< p > < / p >
< p > < a href = "<?" PHP echo $logoutAction? > "> sign OUT < /a > < /p >"
< / body >
< / html >
<? PHP
mysql_free_result ($Recordset1);
? >
Your "regtable" database table should contain a column 'id', right? It's the unique record identifier.
What you named it add to the query string: (let's just the column is named as id)
Add to the query string:
$LoginRS__query = sprintf ("SELECT id, user name, password AND password FROM regtable WHERE username = %s is %s",
Then find the 2 lines of code below:
$LoginRS = mysql_query ($LoginRS__query, $myconn) or die (mysql_error ());
$loginFoundUser = mysql_num_rows ($LoginRS);
Add the 2 lines of code below after the 2 lines of code above.
$row = mysql_fetch_assoc ($LoginRS);
$id = $row ['id'];
Then, locate the lines of code below:
If (isset($_SESSION['PrevUrl']) & true) {}
$MM_redirectLoginSuccess = $_SESSION ["PrevUrl"];
}
Add the following code after the code above:
Insert the number of connection in the database
mysql_query('UPDATE regtable)
SET login_no = login_no + 1 WHERE id = '. ($ ID. ")
or die (mysql_error ());
Then follows the code below (it's already part of the code that exists)
Header ("Location:".) $MM_redirectLoginSuccess);
}
else {}
Header ("Location:".) $MM_redirectLoginFailed);
}
Is she in fact!
Maybe you are looking for
-
removed the audio tracks in logic pro can be restored
removed the audio tracks in logic pro can be restored, has been save logic & empty folders to the folder came, I deleted the originals by mistake...
-
Interesting solution of failure of the fans occasionally cold start?
Interesting solution of failure of the fans occasionally cold start? Normally I do a reset of the SMC, sometimes it's the solution. When kick cooling fans as soon as I start my cold iMac, I just quickly swivel the iMac slowly from right to left and t
-
Is it possible to upgrade the processor on my Satellite L500-128?
I have a Toshiba Satellite L500-128 with an Intel Centrino duo core proccessor with duo core 2 technology and wanted to know if it is possible topgrade whether a quard core proccessor or a core I3 processor? Thank you Oscar
-
Update request for Office CD and gives error 8024002D
Remember - this is a public forum so never post private information such as numbers of mail or telephone! Ideas: Windows Update every time I try to update as requested it starts to install, then stops and and a message saying "the component you are t
-
In Hotmail by clicking on the spam folder it opens a second then returns to the Inbox
Hello Today, I entered my Hotmail email account to check my mails. I started to check the junk e-mail folder. I saw see them all here, which was and then returned to my Inbox, where I removed several old emails. Later, I went back the junk e-mail fo