Insert PHP code to be posted (<? Error)

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
redbrad0
Posts: 6
Joined: Thu Feb 23, 2006 11:33 pm

Insert PHP code to be posted (<? Error)

Post by redbrad0 » Thu Feb 23, 2006 11:41 pm

I am submitting to a form where it contains HTML and PHP code. It is giving me a error saying "load macro error, internal error #121" and then on the left it shows this message.. "Found wrong macro command while loading file: <?(Line:5)

My guess is because my code looks like this...

Code: Select all

This is my html code
<?
include("otherpage.php")
?>
redbrad0
Posts: 6
Joined: Thu Feb 23, 2006 11:33 pm

Post by redbrad0 » Thu Feb 23, 2006 11:42 pm

Sorry I dont really think I asked my question...

Do I have to encode <? somehow? and if so how? Is this the cause of the error?
User avatar
Tech Support
Posts: 4947
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Fri Feb 24, 2006 8:46 am

Hi,

when setting the CONTENT attribute you have to remember that you use the IIM escape characters for special characters like Space, LineBreak and LineFeed. So if you want to set the content of a textarea to

Code: Select all

<?
include("otherpage.php")
?>
your command looks something like

Code: Select all

CONTENT=<?<BR><LF>include("otherpage.php")<BR><LF>?>
Remeber that on Windows OSs the NewLine is a BreakLine followed by a LineFeed. Remember also to fill all Spaces with the <SP> escape character. Admittedly, this does not improve the readability of the code but it is nessecary since the character which marks the end of a macro command is NewLine.

Hope that helps
---
Lasse Clausen, iOpus Support
redbrad0
Posts: 6
Joined: Thu Feb 23, 2006 11:33 pm

Post by redbrad0 » Fri Feb 24, 2006 2:36 pm

Thanks that worked... i knew a new line had to be replaced but I forgot.
Post Reply