Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7629647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:53:17+00:00 2026-05-31T05:53:17+00:00

Possible Duplicate: PHP URL encoding retaining invalid url characters I use a form similiar

  • 0

Possible Duplicate:
PHP URL encoding retaining invalid url characters

I use a form similiar below in admin panel . Where admin can login and post status(uses both database and file system).

<form method="post" action="post.php">
Title : <input type="text" name="title">
Content : <textarea name="status" rows="10" cols="60"></textarea>
</form>

In post.php

$title = trim(strip_tags($_REQUEST['title']));

If an admin posts a status. A folder will be create with the entered title and the title name is stored in mysql database. But when an admin use Special characters like “?” , the url is encoded something like this http://example.com/title? and it shows 404 not found. So how can i replace special characters of title element to entity number.

It will be helpful if the answer is in php

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:53:19+00:00Added an answer on May 31, 2026 at 5:53 am

    Try this

    $title = trim(strip_tags($_POST[‘title’]));

    followed by

    urlencode($title);

    Should do what you need.

    http://de3.php.net/manual/en/function.urlencode.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: save image from php url using php How can i use php
Possible Duplicate: How to: URL re-writing in PHP? How can a website use an
Possible Duplicate: PHP validation/regex for URL Hi, in my form I have a url
Possible Duplicate: Can PHP read the hash portion of the URL? Hi, I want
Possible Duplicate: PHP code is not being executed (i can see it on source
Possible Duplicate: PHP passing parameters via URL I know that if you have a
Possible Duplicate: Find url from string with php I found this code: but 2
Possible Duplicate: maximum length of HTTP GET request? how many characters can be sent
Possible Duplicate: How do I use PHP variables as values for the <script> tag
Possible Duplicate: How can I create an error 404 in PHP? how to make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.