Solved

php error

Posted on 2015-02-16
4
88 Views
Last Modified: 2015-02-16
I have this:
<?php
$skey = mt_rand(0,100000);
....
>?
....
<img src="captcha.php?skey=<? print $skey; >" />

Something is wrong with the statement:

<img src="captcha.php?skey=<? print $skey; >" />

I run it through a syntax checker & it says

PHP Syntax Check: Parse error: syntax error, unexpected '>' in your code on line 403

I've looked at this till I'm going blind and I can see nothing wrong.

What is it?
0
Comment
Question by:Richard Korts
  • 2
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
Marco Gasi earned 500 total points
ID: 40612825
You have to close php tag correctly : ?> instead of >
0
 

Author Closing Comment

by:Richard Korts
ID: 40612833
What a TOTAL idiot I AM.

That's obvious.

This is what happens when you are trying to solve a much bigger problem.
0
 
LVL 30

Expert Comment

by:Marco Gasi
ID: 40612839
LOL: sometimes we just need a couple of fresh eyes!
0
 

Author Comment

by:Richard Korts
ID: 40612967
To Marco Gasi

Look for my next one. Coming right now. It's NOT so easy.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now