close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Posting from dynamic page

Thread began 3/31/2014 10:09 am by larry268887 | Last modified 3/31/2014 4:01 pm by larry268887 | 231 views | 7 replies |

larry268887

Posting from dynamic page

Problem 1 - Local Server

After the submit button is pressed the address bar address becomes http://localhost/bootstrapelvis/teacupyorkieforsale.php?invalid=true. Because this is a dynamic page none of the information is correct and the database is not updated with the form values.

Problem 2 - website server

teacupyorkieforsale.php is the detail page that is used for all the puppies for sale. This page is called by <?php echo ($row_rsTeacups['DetailPage']); ?>-<?php echo $row_rsTeacups['ProdId']; ?>.html . Then the webconfig file rewrites the URL:

<rule name="Imported Rule 1" stopProcessing="true">
<match url="^([^-]*)-([0-9]+)\.html$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(information)" negate="true" />
</conditions>
<action type="Rewrite" url="/teacupyorkieforsale.php?detail={R:1}&amp;Id={R:2}" appendQueryString="false" />
</rule>

So when the submit button is pressed the original address bar url needs to be called. Example the original url is http://www.elvisyorkshireterrier.com/chocolateyorkiepupforsale-193.html after the submit button is pressed the url needs to be http://www.elvisyorkshireterrier.com/chocolateyorkiepupforsale-193.html and not http://www.elvisyorkshireterrier.com/teacupyorkieforsale.php?invalid=true or http://www.elvisyorkshireterrier.com/teacupyorkieforsale.php?Id=193

I don't think it can be coded once to work in both cases but it would be nice is possible. I do need to be able to get to work for both cases so I can test on local server and then rewrite code(if necessary) for it to work on website server.

Attached Files
teacupyorkieforsale.php
Sign in to reply to this post

Jason ByrnesWebAssist

i think for both problems, you should use:

<?php echo ($row_rsTeacups['DetailPage']); ?>-<?php echo $row_rsTeacups['ProdId']; ?>.html

as the form action for the add to cart foprm and the add to waiting list form:

action="<?php echo ($row_rsTeacups['DetailPage']); ?>-<?php echo $row_rsTeacups['ProdId']; ?>.html">

also, rearange the code so that the validation comes after the rsTeacups recordset, and edit the validation failed redirect:
$WAFV_Redirect = "".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)) ."?invalid=true";

to use the same recordset reference:
$WAFV_Redirect = "".$row_rsTeacups['DetailPage']."-".$row_rsTeacups['ProdId']."?invalid=true";

Sign in to reply to this post

larry268887

Doesn't work on website haven't checked testing server yet. The browser is now http://www.elvisyorkshireterrier.com/chocolateyorkiepupforsale-193?invalid=true&detail=chocolateyorkiepupforsale&Id=193 and I get a 404 file or directory not found

Sign in to reply to this post

larry268887

By changing the add to action to the add to cart form causes the add to cart button to not work on the testing server but works on the website server where as the original action code <?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?> works for both servers.

Sign in to reply to this post

Jason ByrnesWebAssist

URL rewriting is really a custom coding scenario, it goes beyond what we can help with thruogh this forum. we could work with you for this in a premiere support appointment:
http://www.webassist.com/premier_request.php

Sign in to reply to this post

larry268887

On my testing server there is no url rewriting. Lets get that one working.

Sign in to reply to this post

Jason ByrnesWebAssist

ok, well then, what is the problem when submitting locally?

Sign in to reply to this post

larry268887

Went ahead and did a premier support ticket and everything is working great.

Sign in to reply to this post

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

Content

rating

Layout

rating

Ease of use

rating

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...