Jump to content

problem with poll


jibo

Recommended Posts

hi, im wanting a poll on my website with 3 options which iva managed to make using to control panel i gt when installing everything on mysql database (, im new so what i mean is ... when i got the script i wanted, and uploaded everything, i ran the setup so it would use the mysql database which then, i could access a acontrol panel through www.mywebsite.com/poll/admin) when i did this it then allowed me to set up the poll i wanted, after doing this it said.... "Replace "{WAY}" by the way, relative (example : "./" if the page invites you to include your survey in the same repertory, "../", if the page is located in the preceding repertory, "./sondage/" if the page is located in a following repertory) to the root of the repertory for your survey." which i assume means... eg "/poll/poll.php" or something similar. what i also gt was the php code to put into my page where i want the poll which is

<?phpunset($id_rubrique_apoll2, $id_poll_apoll2, $voter_apoll2);$id_poll_apoll2 = 1;$chem_script_apoll2 = "{WAY}";include($chem_script_apoll2."poll.php");?>

the only thing is i dont know how to insert this ode into the index, th index is saved as .php and i tried inserting the code where the template poll is now but i just got errors, can someone please give me a solution, thnks :)and below is a screen shot of my cp incase it helps with the replacing the {WAY} thing oh ye and my site is www.choonage.compoll.jpg

Link to comment
Share on other sites

The English isn't very good, but he's telling you to replace {WAY} with the path ("the way") to the poll file. When he says repertory, he means directory or folder. So replace {WAY} in the code block with the relative path to the poll.php file. If you look at these two lines:

$chem_script_apoll2 = "{WAY}";include($chem_script_apoll2."poll.php");

Those are including the poll.php file, so the variable is supposed to hold the relative path to the file. Don't start the path with /, because that makes it absolute, not relative. If you are putting that code in choonage.com/index.php, then way would be "./poll/". If you are putting the code in choonage.com/stuff/page.php, then way would be "../poll/".

Link to comment
Share on other sites

so ur sayin i should change the code to say

$chem_script_apoll2 = "./poll/poll.php";include($chem_script_apoll2."poll.php");

so the "." represents the amount of files in the path to the folder ie if it was going in choonage.com/stuff/morestuff/page.php then it would be ".../poll/" is that correct?also do i just do what i have been doing, replacing the small html code for the template poll for the php code? thanks

Link to comment
Share on other sites

its fine ive managed to do it from youre help thanks alot.... all i needed to change it to is

$chem_script_apoll2 = "./poll/";include($chem_script_apoll2."poll.php");

and now it works, i jus need to figure out how to change the size and colour lol thnks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...