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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:30:08+00:00 2026-06-11T17:30:08+00:00

Quick PHP Question. I am kinda newb to PHP so bear with me. Why

  • 0

Quick PHP Question.
I am kinda newb to PHP so bear with me.

Why this ends up with 500 server error?

<?php
//session start
session_start();

//one time ticket is issued
$ticket = md5(uniqid(mt_rand),TRUE);

//put var ticket in SESSION array which is used in next page.
$_SESSION['ticket'][] = $ticket;

...

$_SESSION['ticketPOST'] = $_POST['ticket'];

...

//functionize htmlspecialchars
function h($string) {
    return htmlspecialchars($string, ENT_QUOTES);
}

?>

in same file down below, I wrote something like this:

<form action="brahbrah.php" method="post">
<input type="hidden" name="ticket" value="<?php echo h($ticket); ?>">
<input type="submit" name="indexForm" value="preview">
</form>

any help appreciated.
Thanx.

  • 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-11T17:30:09+00:00Added an answer on June 11, 2026 at 5:30 pm
    $ticket = md5(uniqid(mt_rand()),TRUE);
    

    mt_rand is a function and you forgot to put ()

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

Sidebar

Related Questions

A quick question involving PHP development, I seem to be wondering about this more
I have a quick question about this PHP function here. What is the am
This should a quick question for some easy rep. I'm doing some PHP Website
Alright, quick question. A server is running in Eastern Time. PHP program needs to
Quick question about Wordpress PHP: I am writing a theme and I want to
A quick question on best practice for handling images in a PHP/MySQL CMS. Each
I am starting out with PRADO php framework and i have a quick question:
A quick questions about sessions, I have a session with the following code <?php
Just a quick one about installing a PHP website, are there any tools out
Quick question : I have a PHP script which query Pinnacle Cart API through

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.