
mister X
Members-
Posts
16 -
Joined
-
Last visited
Never
Everything posted by mister X
-
hmm.. I uncomment that line extension=php_mysql.dll. but somehow, the error is still the there? I did a restart to my apache already..
-
So how do I uncomment that line?
-
Hmm.. I got the following error msg after i enter in my userid and password. Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\terminalserver-soft\Login.php on line 17 What should I do now then?
-
Adding on, whenever I enter in my password and UserID, and click on login, they will redirect to a blank page. Isit a case of wrong coding? pls advice. Thanks
-
Hey, did try out but somehow, it cant seem to proceed on.. I get the page loaded up. But after I enter in my username and password. It just doesnt redirect me to index page. <?php // we must start the session session_start(); $_SESSION['flag'] = true; if (isset($_POST['txtUserId']) && isset($_POST['txtPassword'])) { // store the user's input in the variables $userid = $_POST['txtUserId']; $password = $_POST['txtPassword']; // connect to the lcoalhost and select the appropriate database $sql_index = mysql_connect('localhost', 'root', 'password'); $db_select = mysql_select_db('network_deployment_system', $sql_index); echo $db_select; // retrieve the username and password base on the user's input $sql_query = mysql_query('select * from authorised_user where UserID=\''.$userid.'\' and Password=\''.$password.'\''); // check whether there is a match if (mysql_num_rows($sql_query) == 1) { // fetch data from the table $data = mysql_fetch_row($sql_query); // store the data into session variables $_SESSION['UserID'] = $data[0]; $_SESSION['Password'] = $data[1]; $_SESSION['Administrator'] = $data[2]; // response and redirect to index page once login successful header('Location: Index.php'); } else { $_SESSION['flag'] = false; } } ?>
-
Thanks guys. I will try it out first.
-
Hi, Currently, im doing on a login page using PHP. It requires to match the (username and password) database i created in Mysql. Once it matches, it will bring me to the index page. So can anyone help me with the coding? thanks. Its urgent!
-
one more thing is that, when running the program is always hang halfway through. the loading bar wont complete the loading. How can i solve this issue? If needed, i can upload my whole entire coding up..
-
Hmm.. the program is suppose to allow user to configure router and switch thru the web..
-
Hi. Im wondering is there any way to make the following code run faster. if($control == "enable" || $control == "disable") { fputs ($fp, "config t\n"); if($protocolType == "RIP") { if($control == "enable" && $networkAdd != "") { fputs ($fp, "router ".$protocolType."\n"); fputs ($fp, "network ".$networkAdd."\n"); $moredetails .= fgets ($fp, 4096); $moredetails .= fgets ($fp, 4096); } elseif($control == "disable" && $networkAdd == "") { fputs ($fp, "no router ".$protocolType."\n"); $moredetails .= fgets ($fp, 4096); } } //set IGRP || EIGRP || BGP if($protocolType == "ISO - IGRP" || $protocolType == "EIGRP" || $protocolType == "BGP") { if($control == "enable" && $networkAdd != "" && $autoSystem != "") { fputs ($fp, "router ".$protocolType." ".$autoSystem."\n"); fputs ($fp, "network ".$networkAdd."\n"); $moredetails .= fgets ($fp, 4096); $moredetails .= fgets ($fp, 4096); } elseif($control == "disable" && $autoSystem != "") { fputs ($fp, "no router ".$protocolType." ".$autoSystem."\n"); $moredetails .= fgets ($fp, 4096); } } //set OSPF if($protocolType == "OSPF") { if($control == "enable" && $processID != "" && $networkAdd != "" && $wlidcardMask != "" && $areaNo != "") { fputs ($fp, "router ".$protocolType." ".$processID."\n"); fputs ($fp, "network ".$networkAdd." ".$wlidcardMask." area"." ".$areaNo."\n"); $moredetails .= fgets ($fp, 4096); $moredetails .= fgets ($fp, 4096); } elseif($control == "disable" && $processID != "") { fputs ($fp, "no router ".$protocolType." ".$processID."\n"); $moredetails .= fgets ($fp, 4096); } } //exit from config. mode fputs ($fp,"exit\n"); fputs ($fp, "\r"); if(stristr($zxc,$routername[0].'(config)#')) { fputs ($fp,"exit\n"); fputs ($fp, "\r"); } }
-
How to make a page to complete the updating.
mister X replied to mister X's topic in PHP Coding Help
okay.. i found out. the program can only excuted to configuration terminal in command prompt. below is the coding. Do help to see, is there any mistake or how can i improve on it.. thanks if($control == "enable" || $control == "disable") { fputs ($fp, "config t\n"); if($protocolType == "RIP") { if($control == "enable" && $networkAdd != "") { fputs ($fp, "router ".$protocolType."\n"); fputs ($fp, "network ".$networkAdd."\n"); $moredetails .= fgets ($fp, 4096); $moredetails .= fgets ($fp, 4096); } elseif($control == "disable" && $networkAdd == "") { fputs ($fp, "no router ".$protocolType."\n"); $moredetails .= fgets ($fp, 4096); } } -
How to make a page to complete the updating.
mister X replied to mister X's topic in PHP Coding Help
Hm.. I dont think so. Here the paragraph that uses the $PHP_SELF <!--LEFT COLUMN: DISPLAY INFORMATION & SETTINGS--> <tr><td align="center"> <form name="Password" method="post" action="<?php echo $PHP_SELF; ?>" onSubmit="return Routingcheck();"> -
How to make a page to complete the updating.
mister X replied to mister X's topic in PHP Coding Help
So am I suppose to declar the PHP_SELF ? Or is there any way to solve the problem? -
How to make a page to complete the updating.
mister X replied to mister X's topic in PHP Coding Help
Okay. I got the error message after i tried to save. Below is the msg. Forbidden You don't have permission to access /terminalserver-soft/5r4 Router/<br /><b>Notice</b>: Undefined variable: PHP_SELF in <b>C:/Program Files/Apache Group/Apache2/htdocs/terminalserver-soft/5r4 Router/Routing.php</b> on line <b>270</b><br /> on this server. -------------------------------------------------------------------------------- Apache/2.0.63 (Win32) PHP/5.2.9-2 Server at localhost Port 80 -
How to make a page to complete the updating.
mister X replied to mister X's topic in PHP Coding Help
Hmm..it doesnt solve the problem. The loading bar will hang after the 5th bar.. any idea? -
Hi, Im currently doing a project which help users to configure routers and switches through a web site. However, while im testing out the updating part for 1 configuration, it cant seem to update it. This is due to the long loading time. which cant load finish completely. Can anyone help? If you need the code, do pm me. Thanks