Jump to content

Search the Community

Showing results for tags 'php urlencode form'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. I checked php.net and read a few examples of how urlencode( ) works but somehow I just can't get it right. Can someone give me a hand? it'll be a lot to paste everything so hopefully my brief example would make sense. I have a page called 2.php and it was called to show some contents of a .txt file choosen in 1.php. I am told to make a link for 3.php and the link should look something like /3?filename=a.txt with filename as GET parameter name and Ensure GET parameter value is urlencoded using the urlencode( ) function. but I'm confused how and where I should put urlencode() to make it work. I'll paste my 2.php code here...I simplified the codes a bit... <?php $fileContents = file("./aaa/" . $_GET["course"] . ".txt"); echo "<table border=\"1\">"; foreach($fileContents as $row) { echo "<tr>"; $contents = preg_split("/,/", $row); foreach($contents as $eachline) { echo "<td>"; if(!(preg_match("/@/", $eachline))) { echo trim(ucfirst($eachline)); } else { echo trim(strtolower($eachline)); } echo "</td>"; } echo "</tr>"; } echo "</table>"; echo "<a href='./1.php'>Choose another txt file</a><br/>"; echo "or<br/>"; echo "<a href='.3.php?'>Work with this txt file</a>"; ?> BUT…the 3.php option must have a query string appended to it: the name of the text file that was selected in 1, so instead of ./3.php, the url should be something such as . /3?filename=asdf.txt Use 「filename」 as the GET parameter name. Ensure the GET parameter value is urlencoded using the urlencode( ) function. but I'm just not sure how to get it to work....
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.