Hey, im trying to get a iframe pop up words from a file or something, it should only be able to pop up the word 1 time, i have googled but not much of a php coder so have no idea how this is builded, so if anyone could assist that would help much. Something like this perhaps http://www.freemmogamer.com/2010/12/pandora-saga-beta-key-giveaway.html But instead of keys i will have words
<?php if(isset($_GET['test']) && strcmp($_GET['test'],'test') == 0) echo 'Test word'; else echo '<a href="?test=test" target="_self">Click for test</a>'; ?> PHP: <iframe src="test.php"></iframe> HTML: Something like that....but why don't you use ajax to return the result in a div ? Its much more 20th century...
Thanks will try that code out, not sure how to use it with ajax, do you have a script or code for it that you could post ? Thanks alot for the post above *edit* it only gives me a big white square So they i tryed the whole url like www.mywebsite.com/randomword.php and gave me Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ',' or ')' in /randomword.php on line 2
My bad , sorry...There were some errors in my code ... I just woke up when I first posted Check the code now as it is fixed.
Awsome thank you very much ? It dosent show same word twice right ? And how do i make so its more then 1 word ? Thanks alot
Well , it actually hide's the link that you should click on showing the word...but if you keep the link it will show the same word twice... You asked about how to make it , you didn't say you need to generate something unique or read it from a database... Give me more info on what you want to accomplish...
Okey sorry i wasent clear on my question, im trying to make just like this http://www.freemmogamer.com/2010/11/archlord-dragon-scion-beta-key-giveaway.html This is what im trying to get to my website Click here to get your key! THERE ARE : 1224 KEYS LEFT TO GIVEAWAY But instead i will be using words instead off keys but will work the same way I have no idea if he post all the keys in a file or in a post (he uses wordpress so am i) I really appriciate your help
What he does there is probably something like this : 1.Stores all codes in a database (or randomly generates each code) 2.Fetch a code from the database (or show the random code generated and insert it into a table of codes that should be used ) This is easy to do and I don't feel like create the whole code for you.Google it you will find plenty examples for this topic.
Hmm okey but wouldent that make tons off databases for each iframe i want ? :/ Been searching for iframe guides,examples but cant find what i want Will keep searching, thanks
try this . Stores all codes in a database (or randomly generates each code) 2.Fetch a code from the database as Tvoodoo said. it will work.