Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within PHP
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Microservices Testing (Live Project)
this week in the
Spring
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
Jeanne Boyarsky
Paul Clapham
Sheriffs:
Liutauras Vilda
Henry Wong
Devaka Cooray
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Al Hobbs
Carey Brown
Bartenders:
Piet Souris
Mikalai Zaikin
Himai Minh
Forum:
PHP
error unexpected T_STRING in php
muntago Richard
Ranch Hand
Posts: 82
posted 8 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This code below displays the following errors
Parse error: syntax error, unexpected T_STRING in
C:\xampp\htdocs\copytimeline\timeline\processinsert.php on line 5
INSERT.PHP
<?php session_start(); session_regenerate_id(true); //$_SESSION['token'] = uniqid(md5(microtime()), true); $token = hash('sha256', uniqid(mt_rand(), true)); $_SESSION['token'] = $token; ?> <form method="POST" action="processinsert.php"> <input type="hidden" name="token" value="<?php echo $token; ?>"> username: <input type="text" name="username"> password: <input type="password" name="password" > <input type="submit" name="submit"> </form
processinsert.php
<?php session_start(); session_regenerate_id(true); if ($_POST['token'] !== $_SESSION['token']) { die('Invalid token'); } // process form data as follows $db = new PDO ( 'mysql:host=localhost;dbname=timeline', 'root', // username '' // password ); // insert records to database using PDO ?>
Any help will be appreciated
thanks
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Java Applet Logon Post to PHP
session login hashed password
phpmailer. can not connect to server
session variable problem
Page redirect question...
More...