Link to home
Create AccountLog in
Avatar of mattibutt
mattibuttFlag 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
ASKER CERTIFIED SOLUTION
Avatar of CWS (haripriya)
CWS (haripriya)
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of 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

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?
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
thing is poll will be located on each page not sure how i can do this
can we a screen shot of the existing situation? it will give us a better idea!
hi
on the top there is a menu and the grey screen where poll is appearing its in the iframe
poll.JPG
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
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.
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
yes, I am online now.
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
thanks guys i have managed to resolve this problem