Avatar of mattibutt
mattibutt
Flag for United States of America asked on

poll posting

hi
i want to load and post question from my application to another application
both are in php
Scripting LanguagesPHP

Avatar of undefined
Last Comment
mattibutt

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
CWS (haripriya)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
James Looney

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
mattibutt

ASKER
the thing is poll application has alot of codes so i am thinking if i can either create a new interface or use  existing within my application , i dont know the answer
database tables
CREATE TABLE `itl_poll` (
  `id` int(11) NOT NULL auto_increment,
  `subject` char(255) collate latin1_german2_ci NOT NULL,
  `choices` int(1) NOT NULL,
  `active` set('yes','no') collate latin1_german2_ci NOT NULL,
  `expire` date default '0000-00-00',
  `start` date default '0000-00-00',
  `created` date default '0000-00-00',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci AUTO_INCREMENT=5 ;
 
CREATE TABLE `itl_choices` (
  `id` int(11) NOT NULL auto_increment,
  `ch1` char(100) collate latin1_german2_ci default NULL,
  `ch2` char(100) collate latin1_german2_ci default NULL,
  `ch3` char(100) collate latin1_german2_ci default NULL,
  `ch4` char(100) collate latin1_german2_ci default NULL,
  `ch5` char(100) collate latin1_german2_ci default NULL,
  `ch6` char(100) collate latin1_german2_ci default NULL,
  `ch7` char(100) collate latin1_german2_ci default NULL,
  `ch8` char(100) collate latin1_german2_ci default NULL,
  `ch9` char(100) collate latin1_german2_ci default NULL,
  `ch10` char(100) collate latin1_german2_ci default NULL,
  `ch11` char(100) collate latin1_german2_ci default NULL,
  `ch12` char(100) collate latin1_german2_ci default NULL,
  `ch13` char(100) collate latin1_german2_ci default NULL,
  `ch14` char(100) collate latin1_german2_ci default NULL,
  `ch15` char(100) collate latin1_german2_ci default NULL,
  `ch16` char(100) collate latin1_german2_ci default NULL,
  `ch17` char(100) collate latin1_german2_ci default NULL,
  `ch18` char(100) collate latin1_german2_ci default NULL,
  `ch19` char(100) collate latin1_german2_ci default NULL,
  `ch20` char(100) collate latin1_german2_ci default NULL,
  `ch21` char(100) collate latin1_german2_ci default NULL,
  `ch22` char(100) collate latin1_german2_ci default NULL,
  `ch23` char(100) collate latin1_german2_ci default NULL,
  `ch24` char(100) collate latin1_german2_ci default NULL,
  `ch25` char(100) collate latin1_german2_ci default NULL,
  `ch26` char(100) collate latin1_german2_ci default NULL,
  `ch27` char(100) collate latin1_german2_ci default NULL,
  `ch28` char(100) collate latin1_german2_ci default NULL,
  `ch29` char(100) collate latin1_german2_ci default NULL,
  `ch30` char(100) collate latin1_german2_ci default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci AUTO_INCREMENT=5 ;
 
CREATE TABLE `itl_results` (
  `id` int(11) NOT NULL auto_increment,
  `ch1` int(11) default NULL,
  `ch2` int(11) default NULL,
  `ch3` int(11) default NULL,
  `ch4` int(11) default NULL,
  `ch5` int(11) default NULL,
  `ch6` int(11) default NULL,
  `ch7` int(11) default NULL,
  `ch8` int(11) default NULL,
  `ch9` int(11) default NULL,
  `ch10` int(11) default NULL,
  `ch11` int(11) default NULL,
  `ch12` int(11) default NULL,
  `ch13` int(11) default NULL,
  `ch14` int(11) default NULL,
  `ch15` int(11) default NULL,
  `ch16` int(11) default NULL,
  `ch17` int(11) default NULL,
  `ch18` int(11) default NULL,
  `ch19` int(11) default NULL,
  `ch20` int(11) default NULL,
  `ch21` int(11) default NULL,
  `ch22` int(11) default NULL,
  `ch23` int(11) default NULL,
  `ch24` int(11) default NULL,
  `ch25` int(11) default NULL,
  `ch26` int(11) default NULL,
  `ch27` int(11) default NULL,
  `ch28` int(11) default NULL,
  `ch29` int(11) default NULL,
  `ch30` int(11) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci AUTO_INCREMENT=5 ;

Open in new window

mattibutt

ASKER
hi jimjo95
i cant do include because of the conflict with the two application functions.

hi cyber
i am currently doing using iframe i want to post the userid do you think i will be able to do that?
CWS (haripriya)

if you want to pass the user id to the paeg in iframe, you can pass it in the query string,  
poll.php?userid=$userid
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
mattibutt

ASKER
thing is poll will be located on each page not sure how i can do this
CWS (haripriya)

can we a screen shot of the existing situation? it will give us a better idea!
mattibutt

ASKER
hi
on the top there is a menu and the grey screen where poll is appearing its in the iframe
poll.JPG
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
mattibutt

ASKER
iframe source

<iframe src ="poll/index.php" FRAMEBORDER=0 width="100%" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>

user id fetching code
$query = mysql_query("SELECT * FROM pm_users where username = '".$userdata['username']."'");
$rows = mysql_num_rows($query);
$r = mysql_fetch_array($query);

now the trouble is how do i send userid when the button within iframe is clicked
CWS (haripriya)

where you want to send the userid?

how about storing the userid in a session variable? you can access the userid from the session variable in all your pages.
mattibutt

ASKER
hi cyber
i have found another poll which i am able to include on my page but i am having problem with posting, i think this poll is not for me if you are online let me know then i will post
Your help has saved me hundreds of hours of internet surfing.
fblack61
CWS (haripriya)

yes, I am online now.
mattibutt

ASKER
hi cyber
thanks for replying, this is the new poll i found and the question link is below
https://www.experts-exchange.com/questions/24242564/posting-using-include.html
mattibutt

ASKER
thanks guys i have managed to resolve this problem
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.