Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-09 21:38:16

neoformat
Member
From: Russia
Registered: 2007-02-17
Posts: 37
Website

Please help me with php including!

Hello world !!!

I need your help!! I have a website at http://DimasNet.com and I want to add “php poll” script there.
I know that I can include php scripts so: <txp:php>include ('script.php');</txp:php>

My script is here http://files.dimasnet.com/poll/anketa.php, it works.

When user clicks on the link (a) it calls adress: http://files.dimasnet.com/poll/anketa.php?odpoved=a

But when I insert it script into my textpattern page for example http://dimasnet.com/test and click (a) link it calls href http://dimasnet.com/test?anketa?odpoved=a

But it does not work, it just displays 404 page. I changed script to use ?odpoved= instead of http://dimasnet.com/test?anketa?odpoved=a but it still does ot work.

Please help me,
thx!

Offline

#2 2007-04-09 22:07:32

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Please help me with php including!

What exactly does not work now and how should it work?

Offline

#3 2007-04-10 11:07:44

neoformat
Member
From: Russia
Registered: 2007-02-17
Posts: 37
Website

Re: Please help me with php including!

ruud wrote:

What exactly does not work now and how should it work?

Just try to open http://DimasNet.com/test – there is the poll I am talkng about. When you click one of its poll links: Super, Dobre etc.. It will open new page with succesefull voting, but I want to script to work inside textattern page. Do u understand me???

Offline

#4 2007-04-10 11:49:38

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Please help me with php including!

The links in the poll look like this: <a href="http://files.dimasnet.com/poll/anketa.php?odpoved=a">.
You’ll probably have to change that to <a href="http://dimasnet.com/test?odpoved=a">

Last edited by ruud (2007-04-10 18:34:14)

Offline

#5 2007-04-10 17:57:58

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Please help me with php including!

(I think Ruud means that the other way ‘round.)

Offline

#6 2007-04-10 18:22:41

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Please help me with php including!

Although I’ve been known to make horrible typo’s, I think this time I meant what I wrote ;)
The anketa.php file is outside TXP, so if he wants to show the results inside TXP, he shouldn’t link to an external script, but instead include that script within a TXP page (assuming the script plays nice with including).

Offline

#7 2007-04-10 18:26:29

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Please help me with php including!

(<a href="href http) ?

Offline

#8 2007-04-10 18:36:51

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Please help me with php including!

Um, yeah, I guess that’s one of the horrible typo’s I was referring to (fixed).

Offline

#9 2007-04-10 20:30:27

neoformat
Member
From: Russia
Registered: 2007-02-17
Posts: 37
Website

Re: Please help me with php including!

Ok, but it still does not work. http://dimasnet.com/test

http://dimasnet.com/test?odpoved=a

does nothing :(

Last edited by neoformat (2007-04-11 07:56:25)

Offline

Board footer

Powered by FluxBB