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 8668147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:08:32+00:00 2026-06-12T18:08:32+00:00

This url contains a parameter with text : my-page.php ?id_article=1&alias=article-name The result after rewritting

  • 0

This url contains a parameter with text :

my-page.php ?id_article=1&alias=article-name

The result after rewritting is :

1-article-name.php

For id_article parameter, i made this security :

if (isset($_GET[id_article] && $_GET[article] != null && $_GET[id_article] >= 1 && $_GET[id_article] <= 4 && (int) $_GET[id_article])

What can i do for alias parameter which accept text ?

  • 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-06-12T18:08:33+00:00Added an answer on June 12, 2026 at 6:08 pm

    Firstly, does alias get from database?

    For your exmple :

    my-page.php ?id_article=1&alias=article-name
    

    The result after rewritting is :

    1-article-name.php
    

    My question is : what do you gonna display in 1-article-name.php, is the content is get from the mysql database?

    if so, just use mysql_real_escape_string to sanitize the alias.

    Of course, first the alias must not be empty:

    if(!empty($_GET['alias'])){}
    

    and then use mysql_real_escape_string

    Don’t think that: $_GET, $_POST, $_COOKIE, etc are safe.

    Please kindly use mysql_real_escape_string function to sanitize your variables if you embed a string in some SQL targeting MySql, you must escape the string with MySql’s function for this purpose :

    Use htmlspecialchars If you embed strings within HTML markup, you must escape it with htmlspecialchars. This means that every single echo or print statement should use htmlspecialchars.

    Good luck.

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

Sidebar

Related Questions

My URLconf contains this pattern: url(r'^accounts/logout/$','django.contrib.auth.views.logout', name=logout), And I've trying to reverse that in
I'm having this url parameter: http://127.0.0.1:8000/information/vimeo/?oauth_token=xxxxxxxxxxxxxxxxxxxxxxxx&oauth_verifier=xxxxxxxxxxxxxxxxxxxxxx How can I get the value of oauth_verifier
I have a string which contains the text of an article. This is sprinkled
I have a json feed from this URL which contains 20 fields and I
The html code is pasted into this url http://jsfiddle.net/nzYjV/ The div (id=input) contains the
I cannot download file using java if the url contains special characters. eg:-http://something.com/something/this+this+this.html http://something.com/something/this%20this%20this.html
I have a url that contains these parameters: &lt_ts1=blah&gt_ts1=blah Internet Explorer takes it upon
I have this page in a Liferay 6.0.5 portal which contains of a looong
My pages contain this kind of url: http://fashion.piliapp.com/author/http%3A%2F%2Fwww.wretch.cc%2Fblog%2Fwiwinnie/ which created by http://fashion.piliapp.com/author/ . rawurlencode(http://www.wretch.cc/blog/wiwinnie)
This is the URL: Check this URL In that there is a red ribbon

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.