Solved

php error

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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 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…
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 …

860 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