close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQLi Check New Username and query string

Thread began 11/14/2019 11:49 am by Massimo | Last modified 11/22/2019 1:13 pm by Ray Borduin | 63 views | 6 replies |

Massimo

MySQLi Check New Username and query string

I would check a new user name if exist and if failed I would stay on same url rewrited page.
I have:
real url page is: mypost.php&id=1
and rewrited page is: my_post_1
so
$articleurl = my_post_1


in server behavior I set
$FailedRedirect = "$articleurl";

but I get always incorrect url as:
my_post_1&id=1

how I can remove the latest id?
Thanks

Sign in to reply to this post

Ray BorduinWebAssist

If you attach your copy of wavt_scripts_php.php then I can show you the lines to remove.

Sign in to reply to this post

Massimo

Ok attached it

Attached Files
wavt_scripts_php.zip
Sign in to reply to this post

Ray BorduinWebAssist

You can probably just remove lines 77-83 and that will prevent it from adding the querystring back to the url when redirecting.

Sign in to reply to this post

Massimo

Thanks this work.
Then I have a similar problem with login authentication.
I would authenticate and remain on the same page.

I remove query string by add

$Authenticate->PassURLParameters = false;

and work fine

but for redirect url I get always the non rewrited url:
...
$Authenticate->RememberMe = (false);
$Authenticate->SaveLogin = (false);
$Authenticate->AutoReturn = false;
$Authenticate->PassURLParameters = false;

$SuccessRedirect ="http://localhost/mywebsite/blog/myrewritedurl_1";

$FailedRedirect = "";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;
$Authenticate->execute();


I get the url
http://localhost/mywebsite/mynotrewrited.php?idpost=1

Sign in to reply to this post

Ray BorduinWebAssist

What is your form action set to on the page? I'd probably need FTP access and a URL to reproduce the issue in order to look into it further.

Sign in to reply to this post

Massimo

Thank you very much you gave me the right indication.
I concentrated on login behavior only and completely forgot the action form.
I change the action to the: http://localhost/mywebsite/blog/myrewritedurl_1
and all work well
Thanks you and Web Assist for the great support

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