Solved

php error

Posted on 2015-02-16
4
95 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 31

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 31

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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

734 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