Solved

php error

Posted on 2015-02-16
4
89 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 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses how to create an extensible mechanism for linked drop downs.
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 a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 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