Welcome to WebmasterWorld Guest from 107.20.110.201

Forum Moderators: ocean10000

Message Too Old, No Replies

querystring not working. Server issue ?

     

xert

10:28 am on Jun 16, 2012 (gmt 0)

5+ Year Member



Hi all,

Spent a couple of hours on this and getting nowhere fast so a little help needed. I have a page with querystring code to show the product being reviewed linked from the product page with a querystring in the link.

Link to the review page :

a href="review_form.asp?item_id=geneva+guestbed"

Code on the review_form.asp page :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>review form</title>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div align="center" class="instocktop">Product review form for model <%= Request.QueryString("item_id")%></div>
</body>
</html>

The output shown on the screen is :

Product review form for model <%= Request.QueryString("item_id")%>

The code used to work fine until I checked the other day and I cannot think of any mods I have carried out. The htaccess and robots files are unchanged.

Could this be a server fault ?

Kindest regards to all.

Chris

xert

5:24 pm on Jun 16, 2012 (gmt 0)

5+ Year Member



5 hours in and still can't crack it. I have even set up a test page on a different server but with the same result.

Code for first page (www.sofabedgallery.karoo.net/index.php)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
test page
<a href="karoo_rev.asp?item_id=geneva+guestbed">click</a></div>
</body>
</html>

Linked page (karoo_rev.asp):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<div align="center">Product review form for product : <%= Request.QueryString("item_id") %></div>
</body>
</html>

All I get on the screen when clicking the link is :
"Product review form for product : <%= Request.QueryString("item_id") %>"

Where am I going wrong ?

Ocean10000

1:20 am on Jun 18, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Is the server setup to run asp pages. The test page you provided is php?

xert

8:03 am on Jun 18, 2012 (gmt 0)

5+ Year Member



Hi - many thanks for your input. The page with the code on is the www.sofabedgallery/karoo.net/karoo_rev.asp page.
This is just a test server I have set up without any special properties. After more research, I am wondering if the issue could be with the server permissions on this page. Is that what you are referring to, or is there an extra code needed to be uploaded to run the querystring code ?

If it's the permission, what code number should I be applying ?

Chris

Staffa

1:04 pm on Jun 18, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have often found that it seems to work better by writing your page as :

Linked page (karoo_rev.asp):
<%@ LANGUAGE = "VBScript" %>

<%
item_id = Request.QueryString("item_id")
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<div align="center">Product review form for product : <%= item_id %></div>
</body>
</html>

Don't ask me why, it just happens ;o)

Ocean10000

1:07 pm on Jun 18, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



From the looks of it the test server is running Apache webserver.

Apache to the best of my knowledge will not run asp pages. This is what I believe cause of the problem your having. Apache is treating the asp page as a static page, doing no processing what so ever on it.

xert

1:59 pm on Jun 18, 2012 (gmt 0)

5+ Year Member



Thank you both for your input. After spending many hours on the issue, I re emailed the hosting company who advise support for asp pages has now been withdrawn, hence the reason why the code will not run.
Workaround was to use the following php code to parse the query string :

<?php echo $_GET['item_id']; ?>

This works fine.

Kindest regards,

Chris
 

Featured Threads

Hot Threads This Week

Hot Threads This Month