Home » Htaccess Tools » Htaccess Questions  » redirecting (redirecting with dynamic querystring)
redirecting [message #1923] Mon, 12 July 2010 08:16
divyagopan212  is currently offline divyagopan212
Messages: 1
Registered: July 2010
Location: kerala
sir I have a pages display.php,articleName.php and .htaccess..
all the three pages are described below separated
help me in passing querystrings with urls in the page display.php
I wanna get the page in introductuin-value.php..bo querystrings should be displayed
++++++++++++++++++++++++++++++++++++++++++++=
<?php
include("mysql.php");
connect();

$sql="select * from article where article_delete is null";
//echo $sql;
$result=mysql_query($sql);
$row = mysql_fetch_array($result);

?>
<style type="text/css">
<!--
.style1 {font-family: "Trebuchet MS"}
.style2 {font-family: "Trebuchet MS"; color: #CCCCCC; }
.style3 {color: #008080}
-->
</style>


<table width="695" border="1" align="center" cellpadding="3" cellspacing="3">
<tr bgcolor="#663333">
<td colspan="5" class="style2">List Of Articles

</tr>
<tr bgcolor="#663333">
<td width="38" class="style2">#</td>
<td width="219" class="style2">Title</td>
<td width="87" class="style2">Content</td>
<td width="140" class="style2">Added Date</td>

</tr>
<?php
$i=1;
while($row = mysql_fetch_array($result))
{

?>
<tr>
<td class="style1">&nbsp;<?php echo $i;?></td>
<td class="style1">&nbsp;<a href="<?=$row['articleNameMod'] ?>.htm"><?php echo $row['article_Name']; ?></a></td>
<td class="style1">&nbsp;<?php echo $row['article_Content']; ?></td>
<td class="style1">&nbsp;<?php echo $row['article_Date']; ?></td>

</tr>
<?php
$i=$i+1;
}
?>
</table>
+++++++++++++++++++++++++++

.htacces page
RewriteEngine on
RewriteRule ^(.*).htm articleName.php?articleName=$1

+++++++++++++++++++++++++++++++
articeName.php

<?php
include("mysql.php");
connect();
$sql="select * from article";
//echo $sql;
$result=mysql_query($sql);
$row = mysql_fetch_array($result);

?>
<html>
<body>
<table width="443" height="99" border="1" align="center" cellpadding="3" cellspacing="3">
<tr>
<td width="427" height="27">&nbsp;<?php echo$row['article_Name']?></td>
</tr>
<tr>
<td height="61"><?php echo$row['article_Content']?></td>
</tr>
</table>
</body>
</html>



These are the pages specified ..But i am not getting the value of the query string in the page articleName.php
could you please help me out in finding the error..or help me in passing querystrings with urls in the page display.php

Thanks In advance

[Updated on: Mon, 12 July 2010 08:19]

Previous Topic:cookie authorization to restricted folder based on timestamp
Next Topic:Deny access to .php files to users, but not scripts
Goto Forum:
  


Current Time: Sat Feb 4 03:00:46 CET 2012

Powered by: FUDforum 3.0.0.
Copyright ©2001-2009 FUDforum Bulletin Board Software