Page 1 of 1
Can anyone help me spot the error in this peice of code.....
Posted: Mon Aug 11, 2008 4:52 am
by rajpalyadav
Code: Select all
<?php <a href=result.php?admn_no=$_POST[admn_no]>$_POST[admn_no]</a> echo " ".$row['adm_no']. " "; ?>
Hi everyone,
Above is the code for the stats of a php page.
Can anyone help me spot the error in there, please?
Any help will be appreciated.
Thanks.
Re: Can anyone help me spot the error in this peice of code.....
Posted: Mon Aug 11, 2008 6:38 am
by jayshields
There are many errors in the code. I'm not going to point them out (because it looks like homework to me). If you read up on basic PHP syntax you'll be able to correct the code yourself.
Re: Can anyone help me spot the error in this peice of code.....
Posted: Tue Aug 12, 2008 1:58 am
by rajpalyadav
jayshields wrote:There are many errors in the code. I'm not going to point them out (because it looks like homework to me). If you read up on basic PHP syntax you'll be able to correct the code yourself.
Hi!
I have changed the code as
1. <a href=result.php?adm_no='$_POST[<?php echo " " .$row['adm_no']. " "; ?>]'> </a>
2. <a href=result.php?adm_no='$_POST[adm_no]'> <!--</font> -->
<?php echo " ".$row['adm_no']. " "; ?> </a>
Now errors are not coming but problem is still unresolved
1. is not giving link at all
2. Link showing but value of adm_no is not sent
Can you help ?
Re: Can anyone help me spot the error in this peice of code.....
Posted: Tue Aug 12, 2008 2:06 am
by it2051229
<?php
echo "<a href='result.php?admn_no='".$_POST[admn_no]."'">".$_POST[admn_no]."</a>";
echo " ".$row['adm_no']. " ";
?>
Re: Can anyone help me spot the error in this peice of code.....
Posted: Wed Aug 13, 2008 1:46 am
by rajpalyadav
Thanks for the reply
<?php
echo "<a href='result.php?admn_no='".$_POST[admn_no]."'">".$_POST[admn_no]."</a>";
echo " ".$row['adm_no']. " ";
?>
but it is giving error
"Parse error: syntax error, unexpected '<'" at line no X
I have changed admn_no adm_no as this is the correct field name as written on first line if you notice there is one extra " in 1st line if I remove this then again it is giving error.
Pl suggest Thanks a lot
Re: Can anyone help me spot the error in this peice of code.....
Posted: Wed Aug 13, 2008 5:05 am
by rajpalyadav
Re: Can anyone help me spot the error in this peice of code.....
Posted: Wed Aug 13, 2008 5:46 am
by idevlin
"Parse error: syntax error, unexpected '<'" at line no X
Which line is X then? Is this all the code, or have you left some out?
Re: Can anyone help me spot the error in this peice of code.....
Posted: Thu Aug 14, 2008 1:22 am
by rajpalyadav
Hi,
I have slightly modified the
<?php
echo "<a href='result.php?adm_no=".$_POST[adm_no]." '>".$_POST[adm_no]. "</a>";
echo " ";
?>
Now we are getting the output but when we try to pass the value to result.php and psot the value of adm_no to result.php it is not getting transferred . you may please visit
http://www.ismdhanbad.ac.in/result/result/adm_no.htm and enter 1 or 2 as adm_no and then click the submit you will get result page here you will get a link on Adm_No again click IT SHOULD DISPLAY the same output as I am calling the same result page with same adm_no but it is saying something else , which means that the value of adm_no has not actually been transfered to result.php
Hope to get suitable answer now.
Re: Can anyone help me spot the error in this peice of code.....
Posted: Wed Aug 20, 2008 1:25 am
by rajpalyadav
Hi All,
I want to display a new line in php after the result is displayed in a table at present it is giving on the same line after the table ends just like as a different col I want it to display on a new line just below the table i.e. where the table ends .
Help required pl
Re: Can anyone help me spot the error in this peice of code.....
Posted: Wed Aug 20, 2008 5:28 am
by jayshields
What table? You need to be more descriptive and post more code using [ php ] tags. If this is an unrelated problem, start a new thread.