TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 367
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 72
  • Total: 73
  • @rjen

php parse error in php block (poll)

Started by sanax, November 15, 2006, 07:35:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sanax

I'm trying to insert an 'include' in a phpbox (I'm just experimenting cuz I'm new to php)

I included the following:
<?php

include('http://theartgangster.com/aok-forum/pollscript/');

?>


but get a parse error:
Parse error: parse error, unexpected '<' in /home/gangster/public_html/aok-forum/Sources/Load.php(1711) : eval()'d code(35) : eval()'d code on line 1

...the URL is visible in a browser though but why not in the block?

(Don't know if this is the right forum to post this in - Move if necessary)

G6Cad


sanax

Thank you G6! Works great! Now my next problem and I hope you can help me with that...

If I've voted it redirect me to the index.php in the script:
http://theartgangster.com/aok-forum/pollscript/index.php

... is there a way that I can get the result (above page) show in the block itself and not in a seperate new window?

sanax

I found this but how can I change the code to php?

In order to get back after voting to the site where the vote is included, you need to put a hidden form field into the HTML template:

<input type="hidden" name="vote_redirect" value="http://www.your-server.com/seite.shtml" />

akulion

just echo it out like this

echo '
code here
';

just make sure u dont use any ' (single quotes) inside the code

sanax

Aku... you mean like this?

echo '
<input type="hidden" name="vote_redirect" value="http://theartgangster.com/aok-forum/pollscript/index.php" />
';


???
I tried the above but it still redirects me to a new browser window

akulion

oh for the new browser u cant really do much except try using an iframe really so it changes when someone votes

sanax

In the documentation of the script I found this but when I use a html box it gives me a permission error...

QuoteWith the HTML tag <iframe> you can include the script in an existing page. Place the <iframe> tag where you want it to appear within the page: Example:

<iframe name="voting" src="./voting.php" width="400" height="300" frameborder="0"></iframe>

Maybe I can use the above? I'm trying to figure this out and maybe we can use it as a snippet because I saw there is a need for a vote by guests

akulion

well the code is already given in ur post above for the iframe

but u will probably have to use it as a center block since the poll is pretty huge in dimensions width wise

sanax

#9
It seems to me I'm not allowed to use this <iframe> code in the blocks?! I get this error when using a html box:

QuoteForbidden
You don't have permission to access /aok-forum/index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


--------------------------------------------------------------------------------

Apache/1.3.36 Server at www.theartgangster.com Port 80

Here is the URL of the error: http://theartgangster.com/aok-forum/index.php?action=tpadmin

This website is proudly hosted on Crocweb Cloud Website Hosting.