Solved

Transer parameters from one php page to onother

Posted on 2013-06-12
3
171 Views
Last Modified: 2013-06-13
Hi!

Have this php-page

<?php // RAY_EE_login.php
require_once('RAY_EE_config.php');
$table1 = 'Kontroller';
// ACCESS TO THIS PAGE IS TESTED BUT NOT CONTROLLED
if ($uid = access_control(TRUE))
{
   $brukerID = brukerident('xxx');
}
else
{
        header("location: login.php");
	    exit;
}

?>
<!DOCTYPE html>

<html>
<head>
<meta charset="utf-8" />
<title>Test system</title>

</head>

<body>
<link rel="stylesheet" href="default.css">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">


<table summary="Services, or Links box template" class="servicesT" cellspacing="1">
<tr><td colspan="2" class="servHd">Min kontroller</td></tr>
<br><br>
<?php
$result3 = mysql_query("SELECT Navn FROM {$table1} WHERE Bruker_id='{$brukerID}'") or die(mysql_error());
while ($row3 = mysql_fetch_array($result3)){
    $navn = $row3['Navn'];
	$lokk = $row3['Lokasjons_id'];
?>
<tr>
	<td class="servBodL_medborder" ><?php echo $navn; ?></td>
	<td class="servBodL_medborder"><a href="http://www.softkey.no/webtest/side3.php?Navn=<?php echo $navn; ?>&lokk=<?php echo $lokk; ?>&IDENT=<?php echo $brukerID; ?>"><input type="submit" id="GULKN" value=">"></a></td>
</tr>
<?php
}

?>

</table>
<br>
<table summary="Services, or Links box template" class="servicesT" cellspacing="0">
<tr><td colspan="2" class="servHd">Mine åpne kontroller</td></tr>
<?php

$result3 = mysql_query("SELECT Navn FROM {$table1} WHERE status=1 and Bruker_id='{$brukerID}'") or die(mysql_error());
while ($row3 = mysql_fetch_array($result3)){
    $navn = $row3['Navn'];
?>
<tr>
	<td class="servBodL_medborder" ><?php echo $navn; ?></td>
	<td class="servBodL_medborder"><a <input type="submit" id="GULKN" value=">" href="http://www.test.com/newpage.php?ID=20?IDENT=40"></a></td>
</tr>
<?php
}

?>
</table>
<br><br>
<Form method="post" action="logut.php">
<fieldset id="actions">
	<input type="submit" id="LOGIN" value="Logg ut">
</fieldset>
</Form>

</body>
</html>

Open in new window


My probles is that variable $lokk is emty, and i know that in the database
it contains data...

Why is the variable emty ?
0
Comment
Question by:team2005
3 Comments
 
LVL 11

Accepted Solution

by:
Amar Bardoliwala earned 500 total points
ID: 39240637
Hello  team2005,

It seems that in your 'SELECT' query you are only fetching column 'Navn'. Please change you query as following.

$result3 = mysql_query("SELECT Navn, Lokasjons_id FROM {$table1} WHERE Bruker_id='{$brukerID}'") or die(mysql_error());

Hope, this will help you.

Thank you.

Amar.
0
 
LVL 9

Expert Comment

by:TvMpt
ID: 39240642
To help you debug just make var_dump($result3) after mysql query.

Could be a multidemensional array or just empty too
0
 
LVL 2

Author Closing Comment

by:team2005
ID: 39243772
Thanks for help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Radio button Onclick submit form with validation 5 44
AngularJS Page Control Understanding 5 39
Split in Javascript 5 31
Safari On Gmail only html 12 37
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now