Jump to content

Search the Community

Showing results for tags 'input page processing page'.

  • 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. Hi,I am a beginner in php. And I am trying to create this php program where a user selects a picture and it displays it! Theare is an input page which is html and an processing page which is php! I seemes to have a problem in the processing page of the program. The problem is on line 22 in the processing page and it relates to escape character. How do I fix my issue please help I alredy spend more the several hours on it and still can't figure it out! Here are the code for the processing page: <?php if(isset($_POST['Random'])) { $Random = rand(0,12)." .jpg"; Print "<img src=\ "Photos/$Random\" alt="Smiley face"height="50%" width="50%" border="5" <br/>"; //Problem with escape character heare don't know how to fix it! } else { if (isset($_POST['Anime'])) { $Arr=$_POST['Anime']; displayPhotos($Arr); } else { echo "You need to select photo.<br />"; } function displayPhotos($Arr) { foreach ($Arr as $element) { print " <br/>"; Switch ($element){ Case 1: echo "<img src="Photos/1.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 2: echo "<img src="Photos/2.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 3: echo "<img src="Photos/3.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 4: echo "<img src="Photos/4.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 5: echo "<img src="Photos/5.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 6: echo "<img src="Photos/6.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 7: echo "<img src="Photos/7.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 8: echo "<img src="Photos/8.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 9: echo "<img src="Photos/9.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 10: echo "<img src="Photos/10.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 11: echo "<img src="Photos/11.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; Case 12: echo "<img src="Photos/12.jpg" alt="Smiley face" height="50%" width="50%" border="5" <br/>"; break; } } } } ?><!--End PHP Script--> [b]* Can someone also look at the rest of the code and tell me whats wrong and fix it for me Thank You! Here is the input page incase anyone needs to lok at to solve the processing page codes:[/b] <i>Please click any checkboxes to select a photo!</i> <script type="text/javascript" language="javascript">// <![CDATA[ function checkAll(formName, checktoggle) { var checkboxes = new Array(); checkboxes = document[formName].getElementsByTagName('input'); for (var i=0; i<checkboxes.length; i++) { if (checkboxes[i].type == 'checkbox') { checkboxes[i].checked = checktoggle; } } } // ]]></script> <fieldset> <a onclick="javascript:checkAll('getIt', true);" href="javascript:void();">check all</a> <a onclick="javascript:checkAll('getIt', false);" href="javascript:void();">uncheck all</a><br/> <form action="Process_Page of the Project.php" method="post" name="getIt"> <input type="checkbox" name="Anime[]" value="1" />Code Geass Lelouch Of The Rebellion<br/> <input type="checkbox" name="Anime[]" value="2" />Death Note<br/> <input type="checkbox" name="Anime[]" value="3" />A Certain Magical Index<br/> <input type="checkbox" name="Anime[]" value="4" />Kaze No Stigma<br/> <input type="checkbox" name="Anime[]" value="5" />One Piece<br/> <input type="checkbox" name="Anime[]" value="6" />Trigun<br/> <input type="checkbox" name="Anime[]" value="7" />Tengen Toppa Gurren Lagann<br/> <input type="checkbox" name="Anime[]" value="8" />Prince Of Tennis<br/> <input type="checkbox" name="Anime[]" value="9" />Fairy Tail<br/> <input type="checkbox" name="Anime[]" value="10" />Katekyo Hitman Reborn<br/> <input type="checkbox" name="Anime[]" value="11" />Bleach<br/> <input type="checkbox" name="Anime[]" value="12" />Silver Spoon(Gin no Saji)<br/><br/> <input type="submit" name="formSubmit" value="Submit Choices" /> </form> </fieldset> <br/> <fieldset> <form action="Process_Page of the Project.php" method="post"> You can also click the Random button to view a random photo.<br/><br/> <button name="Random" type="submit" value="R"> Randomize Me!</button> </form> </fieldset> </p> </body> </html>
×
×
  • 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.