close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Custom Shipping calculations Ecart

Thread began 7/28/2014 10:09 am by birdscreen398247 | Last modified 8/07/2014 2:45 pm by birdscreen398247 | 956 views | 9 replies


substr works, but can't get result from recordset.

I cannot get my result page to display a result from a recordset based on a substring from the previous page. I can display that substring on the results page and when I test the recordset, it gives me a correct result, but it won’t display on the page.

I have two pages: an input page and a results page.

The Input Page has a form with a field “zipcode”.

The results page has a form that displays a substring of zipcode and the result of a recordset.

The recordset (on the results page) is as follows:

$colname_rsZipZones = "-1";
if (isset($_GET['substr($_POST["zipcode"],0,3)'])) {
$colname_rsZipZones = $_GET['substr($_POST["zipcode"],0,3)'];
mysql_select_db($database_BirdScreen, $BirdScreen);
$query_rsZipZones = sprintf("SELECT * FROM zipzones WHERE ZIPSTART = %s", GetSQLValueString($colname_rsZipZones, "text"));
$rsZipZones = mysql_query($query_rsZipZones, $BirdScreen) or die(mysql_error());
$row_rsZipZones = mysql_fetch_assoc($rsZipZones);
$totalRows_rsZipZones = mysql_num_rows($rsZipZones);

I tried both a simple echo and also a text field. Both come up blank. (The echo of the substring works fine. It is the result from the recordset that does not display, although the "test" of the recordset works.)

<form name="form1" method="post" action="">

<p>Zip3: <?php echo substr($_POST["zipcode"],0,3); ?></p>
<input name="textfield" type="text" id="textfield" value="<?php echo $row_rsZipZones['ZONE']; ?>">

ZipZone: <?php echo $row_rsZipZones['ZONE']; ?>


What am I doing wrong? You can try the pages at

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...