...

View Full Version : Image in PHP?



Xaqa
05-22-2011, 11:53 PM
I have a website and I'm trying to get text from a input box to go in put of the link for the image code. Like this:


$to_put .= $<img src="http://res.public-craft.com/hb.php?ip=$ServerIP.&port=YOUR_PORT&on=OPTIONAL_ONLINE_IMAGE&off=OPTIONAL_OFFLINE_IMAGE"></img>."|".$ServerIP."|".$Port."|".$Password."|".$Hamachi."|".$Owner."";

Where it says $ServerIP. is where the thing from the input box comes in.

Here's the error I'm receiving.


Parse error: syntax error, unexpected T_STRING in /hermes/bosweb/web258/b2582/ipg.crowngaming/submit/process.php on line 32

tangoforce
05-23-2011, 12:51 AM
You've made quite a few errors - this is what it should look like:


$to_put .= "<img src=\"http://res.public-craft.com/hb.php?ip=$ServerIP&port=YOUR_PORT&on=OPTIONAL_ONLINE_IMAGE&off=OPTIONAL_OFFLINE_IMAGE\"></img>";

I've ignored te stuff after the </img> tag as it was far too messy to understand it.

I've no idea what you're trying to do with YOUR_PORT, OPTIONAL_ONLINE_IMAGE and OPTIONAL_OFFLINE_IMAGE but if they are supposed to be variables then they need the $ in front of them.

Xaqa
05-23-2011, 01:03 AM
They're not, thanks for the help.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum