Jump to content


Photo

I have 3 questions


  • This topic is locked This topic is locked
43 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 01:56 PM

I have been waiting for allmost 2 weeks  php freaks to get back up and running I couldn't get on, but now it's fixed I had a question I really needed help with.

I am having a problem doing something with a pre-existing script, I fixed up a lot of the issues with it, but now I need some help with this.  I was having connection issues but I got it fixed, this was not my script, I just did some major ass reconstruction to try and get it to work right, and then I encounter this, when you click on the form on this page, it doesn't do anything, even though the script is telling it to do something, on top of that, the main thing is, I register, and it makes a username and password, but nothing works when trying to log in, which is the same page the form is, that is actually the form that doesn't work for some reason.

page with form
http://www.asicip.com/login.php
Here is the code for that page, and for the include that does the connection, the connection seems to work, I have used it and it connected properly on the page, I had some connection issues before, but I had someone help me fix those specifically.
Now what is wrong with it, any advice

Log-in page
<?php
session_start();

require_once("incs/conn.inc.php");

	if(isset($_POST['submit'])) {
	  $sql = "select id_administrator,superuser from administrators where username = '".$_POST['username']."' and password = '".$_POST['password']."'";
		$rez = mysql_query($sql) or die (mysql_error());
		if(mysql_num_rows($rez) > 0){
		  $row = mysql_fetch_row($rez) or die("The mysql fetch row is not working");
		  session_register("administrator_portal") or die("Session register issues");
			$_SESSION['administrator_portal'] = $row[0];
			$_SESSION['superuser'] = $row[1];
			 $sql="update `administrators` set `LastLoginAdmin`=Now() where id_administrator=".$_SESSION['administrator_portal'];
			 $result=mysql_query($sql,$conn);
			header("Location: download2.php");
			exit;
		}else{
		  $msg = "The username or password are wrong.";
		}
	}
  if($_GET['erroare'] == "nr"){
    $msg = "Ne pare rau insa sesiunea dumneavostra a expirat.<br> You must log on.";
  }
?>
<html>
<head>
<LINK href="style.css" rel=stylesheet type=text/css>
<title>ASIC IP</title>
</head>
<body bgcolor="#9aa8c7" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">

<script type="text/javascript">
if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.

ch1_on   = new Image();   ch1_off   = new Image();
ch2_on   = new Image();   ch2_off   = new Image();
ch3_on   = new Image();   ch3_off   = new Image();
ch4_on   = new Image();   ch4_off   = new Image();
ch5_on   = new Image();   ch5_off   = new Image();
ch6_on   = new Image();   ch6_off   = new Image();
ch7_on   = new Image();   ch7_off   = new Image();
ch8_on   = new Image();   ch8_off   = new Image();

ch1_on.src   = 'images/b_homeap.gif';
ch1_off.src  = 'images/b_home.gif';
ch2_on.src   = 'images/b_aboutap.gif';
ch2_off.src  = 'images/b_about.gif';
ch3_on.src   = 'images/b_infoap.gif';
ch3_off.src  = 'images/b_info.gif';
ch4_on.src   = 'images/b_downloadap.gif';
ch4_off.src  = 'images/b_download.gif';
ch5_on.src   = 'images/b_careerap.gif';
ch5_off.src  = 'images/b_career.gif';
ch6_on.src   = 'images/b_teamap.gif';
ch6_off.src  = 'images/b_team.gif';
ch7_on.src   = 'images/b_pressap.gif';
ch7_off.src  = 'images/b_press.gif';
ch8_on.src   = 'images/b_contactap.gif';
ch8_off.src  = 'images/b_contact.gif';

}

function activate(image) {
  if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.
      imagesrc = eval(image + '_on.src');
      document[image].src = imagesrc;
  }
}

function deactivate(image) {
  if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.
      imagesrc = eval(image + "_off.src");
      document[image].src = imagesrc;
  }
}
</script>

<center>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="right" valign="top">&nbsp;</td>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="700">
<tr>
<td bgcolor="#9aa8c7">

<? include("incs/top_menu.inc.php");  ?>

<table border="0" cellpadding="0" cellspacing="0" width="700" bgcolor="#FFFFFF">
	<tr><td>
		<table border="0" cellpadding="0" cellspacing="0" width="700">
			<tr>
				<td width="6">&nbsp;</td>
				<td width="164" valign="top" bgcolor="#f1f1f1">
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="6"></td><td height="24">
					<font class="titlu2">Downloads : :</font>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="10" height="20"></td><td>
					<a href="download.php" class="n">Downloads</a>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="10" height="20"></td><td>
					<a href="login.php" class="n">Login</a>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="10" height="20"></td><td>
					<a href="register.php" class="n">Register</a>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>

				<br>
				</td>
				<td width="10">&nbsp;</td>
				<td width="510" valign="top">

					<img src="images/linie.gif"><br>
					<br>
				&nbsp;&nbsp;<font class="titlu">Login</font>
	<br><br>
	<img src="images/linie.gif"><br>
	<br>
	<form name="form1" method="post" action="login.php">
	<table border="0" cellspacing="0" cellpadding="0" width="200" height="96">
						<tr><td>
							<table width="200" border="0" cellspacing="0" cellpadding="0">
							<tr><td height="34" colspan="3">&nbsp;</td></tr>
							<tr><td width="140">
							<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="16">&nbsp;</td>
								<td valign="top"><input type="text" name="username" style="width: 150;"></td>
								<td width="14">&nbsp;</td>
							</tr>
							<tr>
								<td width="16" height="14">&nbsp;</td>
								<td valign="top"><input type="password" name="password" style="width: 150;"></td>
								<td width="14">&nbsp;</td>
							</tr>
							</table>
							</td>
							<td><input type="submit" name="submit" value="Login" class="button"></td></tr>
							</table>
						</td></tr>
					</table>

	</form>
	<br>
	<a href="register.php">Click here to register</a>
	<table  border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td valign="top">



</tr>
</table>



	<br><br>
	<img src="images/linie.gif"><br>
	<table border="0" cellpadding="0" cellspacing="0">
		<tr><td><img src="images/sigla_jos.gif"><br></td>
		<td class="stitlu">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trademarks/Copyright ©2006 ASIC IP. All Rights Reserved.</td></tr>
	</table>

	<img src="images/linie.gif"><br>
	<br>
				</td>
				<td width="10">&nbsp;</td>
			</tr>
		</table>


	</td></tr>
</table>

</td>
</tr>
</table>

</td>
<td align="left" valign="top">&nbsp;</td>
</td>
</tr>
</table>
</center>
</body>
</html>

The included page

<?php
$conn = mysql_connect ("mysql", "#####", "#####");
$select = mysql_select_db("ip");
?>
I am sure mysql is there instead of localhost, it is with yahoo, I am starting to hate yahoo more and more, they are the most retarded company I have ever seen, I am going to start converting all my yahoo clients, over to another more worthy host, yahoo is pathetic, no htaccess, or php ini access.  There settings suck anus.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 03 July 2006 - 02:02 PM

I dont see any call to session_start() in your script.

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 02:51 PM

session_start();

Very very top of the login.php file, it's there.
Unless you mean somewhere else I should have it.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 03 July 2006 - 03:35 PM

Where ever you use sessions you must place session_start at the top of each page that uses sessions. Otherwise your sessions wont work.

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 05:02 PM

I will try this real quick and see if I can figure anything out, maybe I left a session_start out somewhere, let me try that maybe it will help.  Thanks

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#6 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 05:19 PM

I did use sessions_start on all of them, this is what is happening and it is really confusing me, this is the related page.
http://www.asicip.com/download.php
That is the page you go to, here you click on a link.  It takes you to the login page here.
http://www.asicip.com/login.php
THis is where you login at, you can register, the register form is on that link if you click register, it works, adn it puts the information in the database properly I already tested it out, now when you try and click login, it doesn't do anything, it doesn't even work, it acts like it's not even working, I really really don't understand.  You are suppose to be able to login, to get access to those files, I really really do not understand this, and any advice would be greatly appreciated, here is an example, here is the code for the downloads page, with all the links.
Below that, is again the code for the page I am talking about, the login page, and I will also put the include page below there.  You will see what I mean by it not working.  I will also explains how it works, there is a page called download.php, all the links there are suppose to take you to the login.php page, it works perfectly.  Then on the logins page, if you don't have a username and password you register, it works, it records your data, here is where the first issue occurs, it sends an email with just your email address, and nothing else, that is the first problem.  Then when you are suppose to login, if you get the correct info it changed you over to the download2.php page there you can access all the files, because the links are changed to allow you access to the files,  BUt it's not working when I click on the page login, and I try to login nothing happens.
Here is all the text
The first download page, where you are denied access, it just changes you over the the login page

Download 1
Actually the code isn't even important, all it is, is a static page, with a bunch of links taking you to the login page, the login page, is here
login page
<?php
session_start();

require_once("incs/conn.inc.php");

	if(isset($_POST['submit'])) {
	  $sql = "select id_administrator,superuser from administrators where username = '".$_POST['username']."' and password = '".$_POST['password']."'";
		$rez = mysql_query($sql) or die (mysql_error());
		if(mysql_num_rows($rez) > 0){
		  $row = mysql_fetch_row($rez) or die("The mysql fetch row is not working");
		  session_register("administrator_portal") or die("Session register issues");
			$_SESSION['administrator_portal'] = $row[0];
			$_SESSION['superuser'] = $row[1];
			 $sql="update `administrators` set `LastLoginAdmin`=Now() where id_administrator=".$_SESSION['administrator_portal'];
			 $result=mysql_query($sql,$conn);
			header("Location: download2.php");
			exit;
		}else{
		  $msg = "The username or password are wrong.";
		}
	}
  if($_GET['erroare'] == "nr"){
    $msg = "Ne pare rau insa sesiunea dumneavostra a expirat.<br> You must log on.";
  }
?>
<html>
<head>
<LINK href="style.css" rel=stylesheet type=text/css>
<title>ASIC IP</title>
</head>
<body bgcolor="#9aa8c7" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">

<script type="text/javascript">
if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.

ch1_on   = new Image();   ch1_off   = new Image();
ch2_on   = new Image();   ch2_off   = new Image();
ch3_on   = new Image();   ch3_off   = new Image();
ch4_on   = new Image();   ch4_off   = new Image();
ch5_on   = new Image();   ch5_off   = new Image();
ch6_on   = new Image();   ch6_off   = new Image();
ch7_on   = new Image();   ch7_off   = new Image();
ch8_on   = new Image();   ch8_off   = new Image();

ch1_on.src   = 'images/b_homeap.gif';
ch1_off.src  = 'images/b_home.gif';
ch2_on.src   = 'images/b_aboutap.gif';
ch2_off.src  = 'images/b_about.gif';
ch3_on.src   = 'images/b_infoap.gif';
ch3_off.src  = 'images/b_info.gif';
ch4_on.src   = 'images/b_downloadap.gif';
ch4_off.src  = 'images/b_download.gif';
ch5_on.src   = 'images/b_careerap.gif';
ch5_off.src  = 'images/b_career.gif';
ch6_on.src   = 'images/b_teamap.gif';
ch6_off.src  = 'images/b_team.gif';
ch7_on.src   = 'images/b_pressap.gif';
ch7_off.src  = 'images/b_press.gif';
ch8_on.src   = 'images/b_contactap.gif';
ch8_off.src  = 'images/b_contact.gif';

}

function activate(image) {
  if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.
      imagesrc = eval(image + '_on.src');
      document[image].src = imagesrc;
  }
}

function deactivate(image) {
  if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.
      imagesrc = eval(image + "_off.src");
      document[image].src = imagesrc;
  }
}
</script>

<center>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="right" valign="top">&nbsp;</td>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="700">
<tr>
<td bgcolor="#9aa8c7">

<? include("incs/top_menu.inc.php");  ?>

<table border="0" cellpadding="0" cellspacing="0" width="700" bgcolor="#FFFFFF">
	<tr><td>
		<table border="0" cellpadding="0" cellspacing="0" width="700">
			<tr>
				<td width="6">&nbsp;</td>
				<td width="164" valign="top" bgcolor="#f1f1f1">
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="6"></td><td height="24">
					<font class="titlu2">Downloads : :</font>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="10" height="20"></td><td>
					<a href="download.php" class="n">Downloads</a>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="10" height="20"></td><td>
					<a href="login.php" class="n">Login</a>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="10" height="20"></td><td>
					<a href="register.php" class="n">Register</a>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>

				<br>
				</td>
				<td width="10">&nbsp;</td>
				<td width="510" valign="top">

					<img src="images/linie.gif"><br>
					<br>
				&nbsp;&nbsp;<font class="titlu">Login</font>
	<br><br>
	<img src="images/linie.gif"><br>
	<br>
	<form name="form1" method="post" action="login.php">
	<table border="0" cellspacing="0" cellpadding="0" width="200" height="96">
						<tr><td>
							<table width="200" border="0" cellspacing="0" cellpadding="0">
							<tr><td height="34" colspan="3">&nbsp;</td></tr>
							<tr><td width="140">
							<table border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="16">&nbsp;</td>
								<td valign="top"><input type="text" name="username" style="width: 150;"></td>
								<td width="14">&nbsp;</td>
							</tr>
							<tr>
								<td width="16" height="14">&nbsp;</td>
								<td valign="top"><input type="password" name="password" style="width: 150;"></td>
								<td width="14">&nbsp;</td>
							</tr>
							</table>
							</td>
							<td><input type="submit" name="submit" value="Login" class="button"></td></tr>
							</table>
						</td></tr>
					</table>

	</form>
	<br>
	<a href="register.php">Click here to register</a>
	<table  border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td valign="top">



</tr>
</table>



	<br><br>
	<img src="images/linie.gif"><br>
	<table border="0" cellpadding="0" cellspacing="0">
		<tr><td><img src="images/sigla_jos.gif"><br></td>
		<td class="stitlu">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trademarks/Copyright ©2006 ASIC IP. All Rights Reserved.</td></tr>
	</table>

	<img src="images/linie.gif"><br>
	<br>
				</td>
				<td width="10">&nbsp;</td>
			</tr>
		</table>


	</td></tr>
</table>

</td>
</tr>
</table>

</td>
<td align="left" valign="top">&nbsp;</td>
</td>
</tr>
</table>
</center>
</body>
</html>

Here is the included file, this only does the connection, it just connects to the database that is it.
<?php
$conn = mysql_connect ("mysql", "####", "####");
$select = mysql_select_db("ip");
?>
mysql is required instead of local host, it's something to do with the way yahoo sets up there stuff.

Here is the new download page you should get access too.
<?php 
session_start();
include("incs/auth.inc.php"); 
?>
<html>
<head>
<LINK href="style.css" rel=stylesheet type=text/css>
<title>ASIC IP</title>
</head>
<body bgcolor="#9aa8c7" topmargin="0" leftmargin="0" marginwidth="0" marginheight="0">

<script type="text/javascript">
<!--
if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.

ch1_on   = new Image();   ch1_off   = new Image();
ch2_on   = new Image();   ch2_off   = new Image();
ch3_on   = new Image();   ch3_off   = new Image();
ch4_on   = new Image();   ch4_off   = new Image();
ch5_on   = new Image();   ch5_off   = new Image();
ch6_on   = new Image();   ch6_off   = new Image();
ch7_on   = new Image();   ch7_off   = new Image();
ch8_on   = new Image();   ch8_off   = new Image();

ch1_on.src   = 'images/b_homeap.gif';
ch1_off.src  = 'images/b_home.gif';
ch2_on.src   = 'images/b_aboutap.gif';
ch2_off.src  = 'images/b_about.gif';
ch3_on.src   = 'images/b_infoap.gif';
ch3_off.src  = 'images/b_info.gif';
ch4_on.src   = 'images/b_downloadap.gif';
ch4_off.src  = 'images/b_download.gif';
ch5_on.src   = 'images/b_careerap.gif';
ch5_off.src  = 'images/b_career.gif';
ch6_on.src   = 'images/b_teamap.gif';
ch6_off.src  = 'images/b_team.gif';
ch7_on.src   = 'images/b_pressap.gif';
ch7_off.src  = 'images/b_press.gif';
ch8_on.src   = 'images/b_contactap.gif';
ch8_off.src  = 'images/b_contact.gif';

}

function activate(image) {
  if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.
      imagesrc = eval(image + '_on.src');
      document[image].src = imagesrc;
  }
}

function deactivate(image) {
  if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.
      imagesrc = eval(image + "_off.src");
      document[image].src = imagesrc;
  }
}
-->
</script>

<center>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="right" valign="top">&nbsp;</td>
<td align="center">
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="700">
<tr>
<td bgcolor="#9aa8c7">

<? include("incs/top_menu.inc.php");  ?>

<table border="0" cellpadding="0" cellspacing="0" width="700" bgcolor="#FFFFFF">
	<tr><td>
		<table border="0" cellpadding="0" cellspacing="0" width="700">
			<tr>
				<td width="6">&nbsp;</td>
				<td width="164" valign="top" bgcolor="#f1f1f1">
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="6"></td><td height="24">
					<font class="titlu2">Downloads : :</font>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>
				<table  border="0" cellpadding="0" cellspacing="0">
					<tr><td width="10" height="20"></td><td>
					<a href="download2.php" class="n">Downloads</a>
					</td></tr>
				</table>
				<img src="images/p.gif" width="164" height="1" border="0"><br>

				<br>
				</td>
				<td width="10">&nbsp;</td>
				<td width="510" valign="top">
					
					<img src="images/linie.gif"><br>
					<br>
				&nbsp;&nbsp;<font class="titlu">Downloads</font>			
	<br><br>
	<img src="images/linie.gif"><br>
	<br>
	<table  border="0" cellpadding="0" cellspacing="0">
	<tr>
	<td valign="top">
    <img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP 100mA Boost.pdf" class="n" target="_blank">ASIC IP 100mA Boost</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Adair 100b.pdf" class="n" target="_blank">ASIC IP Adair 100b</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Adair 802.11 and network tester (UBT).pdf" class="n" target="_blank">ASIC IP Adair 802.11 and network tester (UBT)</a>
	<br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Adair 900 and 2.4G.pdf" class="n" target="_blank">ASIC IP Adair 900 and 2.4G</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Antenna Modules.pdf" class="n" target="_blank">ASIC IP Antenna Modules</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Bandgap Ref.pdf" class="n" target="_blank">ASIC IP Bandgap Ref</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Boost PS0100.pdf" class="n" target="_blank">ASIC IP Boost PS0100</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP Controller board.pdf" class="n" target="_blank">ASIC IP Controller board</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP LDO 150mA.pdf" class="n" target="_blank">ASIC IP LDO 150mA</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP LDO 300mA.pdf" class="n" target="_blank">ASIC IP LDO 300mA</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP LDO 50mA.pdf" class="n" target="_blank">ASIC IP LDO 50mA</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP R2400 Radio Module.pdf" class="n" target="_blank">ASIC IP R2400 Radio Module</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/ASIC IP RF Modules.pdf" class="n" target="_blank">ASIC IP RF Modules</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/IP Intranet Supplier Station.pdf" class="n" target="_blank">IP Intranet Supplier Station</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/IP Provider Station.pdf" class="n" target="_blank">IP Provider Station</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/IP Reuse Station.pdf" class="n" target="_blank">IP Reuse Station</a>
	<br><br>
	<img src="images/rosu.gif" border="0"> &nbsp; <a href="dw/IP SoC Collaborative Platform.pdf" class="n" target="_blank">IP SoC Collaborative Platform</a>
	<br><br>


</tr>
</table>



	<br><br>
	<img src="images/linie.gif"><br>
	<table border="0" cellpadding="0" cellspacing="0">
		<tr><td><img src="images/sigla_jos.gif"><br></td>
		<td class="stitlu">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trademarks/Copyright ©2006 ASIC IP. All Rights Reserved.</td></tr>
	</table>
	
	<img src="images/linie.gif"><br>
	<br>
				</td>
				<td width="10">&nbsp;</td>
			</tr>
		</table>


	</td></tr>
</table>

</td>
</tr>
</table>

</td>
<td align="left" valign="top">&nbsp;</td>
</td>
</tr>
</table>
</center>
</body>
</html>
See I did not do this website, someone else did the whole thing, I came in and fixed some things because he didn't finish it, I think it's shit it's done in tables, the programming is sometimes pointless.  I can't redo the whole site, because I am fixing a few issues for just a few hundred.  I was wondering what to do about this, I have been trying, I have done everything I can think of, mysql_error calls, die, and everything else, I have been debugging for 3 days, and I feel it's probably something simple, can anyone help me out with that.  Thanks

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#7 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 05:43 PM

I found one thing using echo statements, it is properly picking up the submit, and it is stopping at this line for some reason, but I went over it 4-5 times it all looks correct.
 $sql = "SELECT id_administrator,superuser FROM administrators WHERE username = '".$_POST['username']."' and password = '".$_POST['password']."'";
		$rez = mysql_query($sql);
It is even getting the sql variable initialized, the problem is when it trys to run
$rez = mysql_query($sql);
That is when the script stops running any advice, there are 2 columns named that, and a table named that, and the other stuff looks right what is going on.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 03 July 2006 - 05:55 PM

Sorry to complain but the amount of images on that page is way to much.


also can not see where your calling the function($name);

or return();


also where the connection for the last page

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 03 July 2006 - 05:57 PM

What is displayed when you change

<?php
    $rez = mysql_query($sql);
?>

to

<?php
     $rez = mysql_query($sql) or die("There was a problem with the query: $sql<br>" . mysql_error());
?>

Ken

#10 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 06:08 PM

What is displayed when you change

<?php
    $rez = mysql_query($sql);
?>
to

<?php
    $rez = mysql_query($sql) or die("There was a problem with the query: $sql<br>" . mysql_error());
?>
Ken

Nothing it does absolutely nothing, I copied and pasted what you said, it still has my echo statement from earlier showing that the submit was accepted but nothing below that.  Nothing changed.

Sorry to complain but the amount of images on that page is way to much.


also can not see where your calling the function($name);

or return();


also where the connection for the last page

I didn't make this website, the entire layout, design, images, content everything is someone elses, they bailed on the guy I am working for, he just needed a few more things done, so I made a few things worked, finished up the scripts for a few forms, sorted through and got register to work and ran into this, so I had no choice over images. As far as function calls to name or return, I didn't see that anywhere what do you mean.
And What do you mean about connection for the last page.

If anyone can help I would be greatly appreciative I am starting to get desperate on this.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#11 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 03 July 2006 - 06:18 PM

you got to correct the connection ok

example

$db=mysql_connect("whatever",whatever",whatever");
mysql_select_db("whatever",$db);


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#12 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 06:20 PM

I am connected.  It is in an included file, as I said up there, it is also listed out up there, the connection is good, but it's messing up the query, I will even right now attempt to move the connection information over to the other page, and see how it goes.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#13 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 06:21 PM

I just checked it's not that, it is directly related to that query for some reason?

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#14 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 03 July 2006 - 06:30 PM

Try without the post there and just use the '$varable_names'

example only

<?php
session_start();

require_once("incs/conn.inc.php");

if(isset($_POST['submit'])) {
  $sql = "select id_administrator,superuser from administrators where username = '$username' and password = ' $password ' ";
$rez = mysql_query($sql) or die (mysql_error());
if(mysql_num_rows($rez) > 0){
  $row = mysql_fetch_row($rez) or die("The mysql fetch row is not working");
  session_register("administrator_portal") or die("Session register issues");
$_SESSION['administrator_portal'] = $row[0];
$_SESSION['superuser'] = $row[1];
$sql="update `administrators` set `LastLoginAdmin`=Now() where id_administrator=".$_SESSION['administrator_portal'];
$result=mysql_query($sql,$conn);
header("Location: download2.php");
exit;
}else{
  $msg = "The username or password are wrong.";
}
}
  if($_GET['erroare'] == "nr"){
    $msg = "Ne pare rau insa sesiunea dumneavostra a expirat.<br> You must log on.";
  }
?>
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#15 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 06:38 PM

if(isset($_POST['submit'])) {
	echo "Right after Submit is Accepted";
	$username = $_POST['username'];
	$password = $_POST['password'];
	  $sql = "SELECT id_administrator,superuser FROM administrators WHERE username = {$username} and password = {$password}";
	  	echo = "After sql is set";
		$rez = mysql_query($sql);
		echo = "After mysql Query";
I did that and now there is a problem.
It doesn't do anything, the entire login page is completely white now, when I try to even get to the page?

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#16 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 03 July 2006 - 06:38 PM

you plonker rodney lol joke..............

YOUR USING TWO QUERYS WITH THE SAME $SQL VALABLE CHANE ONE!
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#17 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 03 July 2006 - 06:40 PM

put it back then and look at your code i see your using two $sql valabers one for update and one for select change one ok
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#18 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 06:44 PM

Ok I didn't catch that before, Mostly because it's not my script I was just trying to fix it, I changed a few things around this is what I currently have.  And unfortunately I am still getting the exact same issue.

<?php
session_start();

require_once("incs/conn.inc.php");

	if(isset($_POST['submit'])) {
	echo "Right after Submit is Accepted";
	  $select = "SELECT id_administrator,superuser FROM administrators WHERE username = '".$_POST['username']."' and password = '".$_POST['password']."'";
$rez = mysql_query($select) or die("There was a problem with the query: $sql<br>" . mysql_error());
		if(mysql_num_rows($rez) > 0){
		echo "Right after checking if for numrows";
		  $row = mysql_fetch_row($rez) or die("The mysql fetch row is not working");
		  session_register("administrator_portal");
			$_SESSION['administrator_portal'] = $row[0];
			$_SESSION['superuser'] = $row[1];
			 $update="update `administrators` set `LastLoginAdmin`=Now() where id_administrator=".$_SESSION['administrator_portal'];
			 $result=mysql_query($update,$conn);
			header("Location: download2.php");
			exit;
		}else{
		  $msg = "The username or password are wrong.";
		}
	}
  if($_GET['erroare'] == "nr"){
    $msg = "Ne pare rau insa sesiunea dumneavostra a expirat.<br> You must log on.";
  }
?>
I changed the parts where they were like that, but the exact same thing is still happening

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#19 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 03 July 2006 - 06:52 PM

trythis

<?php
session_start();

require_once("incs/conn.inc.php");

if(isset($_POST['submit'])) {
echo "Right after Submit is Accepted";
  $sql1= "SELECT id_administrator,superuser FROM administrators WHERE username = '".$_POST['username']."' and password = '".$_POST['password']."'";

$rez = mysql_query($sql1) or die("There was a problem with the query: $sql1<br>" . mysql_error());

if(mysql_num_rows($rez) > 0){
echo "Right after checking if for numrows";

  $row = mysql_fetch_row($rez) or die("The mysql fetch row is not working");

  session_register('administrator_portal');//used  single quote

$_SESSION['administrator_portal'] = $row[0];
$_SESSION['superuser'] = $row[1];

$update="update `administrators` set `LastLoginAdmin`=Now() where id_administrator=".$_SESSION['administrator_portal'];

$result=mysql_query($update); //removed $conn

header("Location: download2.php");
exit;
}else{
  $msg = "The username or password are wrong.";
}
}
  if($_GET['erroare'] == "nr"){
    $msg = "Ne pare rau insa sesiunea dumneavostra a expirat.<br> You must log on.";
  }
?>
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#20 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 03 July 2006 - 07:01 PM

I did EXACTLY as you showed, copied and pasted what you had over the old, I don't understand, but it's still doing the same problem, here is my table information it seems to match.
Db name doesn't matter I tested that connection, it's already connected to the database
database name = ip
table name = administrators
and here are the fields in that table

  Field  Type Collation Attributes Null Default Extra Action
  id_administrator  int(10)    No    auto_increment             
  username  varchar(50) latin1_swedish_ci  Yes  NULL               
  password  varchar(50) latin1_swedish_ci  Yes  NULL               
  adminfirstname  varchar(100) latin1_swedish_ci  Yes  NULL               
  adminlastname  varchar(100) latin1_swedish_ci  Yes  NULL               
  email  varchar(200) latin1_swedish_ci  Yes  NULL               
  LastLoginAdmin  date    Yes  NULL               
  regdate  date    Yes  NULL               
  superuser  tinyint(1)    UNSIGNED Yes  0               
Check All  /  Uncheck All    With selected:         


I REALLY don't understand why this is happening, and now the new code, I changed it exactly to how you had it, and it's still not working, any more advice, Ihave been fighting this for almost a week now, now you see where I am coming from, I am confused.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users