Jump to content

qbit

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

qbit's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. qbit

    PREG_Delete?

    Haha So true. I really am not a fan of myspace. I just know alot of people that have it... And since they all live on it... Its like my myspace e-mail bin. Sad I know. A part of me died the second I made my account. Nice blog btw.
  2. qbit

    PREG_Delete?

    Yea... Ill just see how far I can get... Ittl be interesting... Maybe ill write a book "DUPING MYSPACE!" Lol.
  3. qbit

    PREG_Delete?

    [!--quoteo(post=385210:date=Jun 17 2006, 09:39 PM:name=robos99)--][div class=\'quotetop\']QUOTE(robos99 @ Jun 17 2006, 09:39 PM) [snapback]385210[/snapback][/div][div class=\'quotemain\'][!--quotec--] unless of course you have no issue with getting your user's accounts deleted. [/quote] Bingo. :) I am mainly doing this to learn more about php. And have some fun screwing with myspace. And I might change it to just give the person the code so they can copy and paste the code to their myspace.
  4. qbit

    PREG_Delete?

    Yea... Me either. I have alot of HTML experience... But I never really did any forms beyond your basic mailing form. Haha. Yea, I think I will keep it. More spaces for ads. ^_^ I catch on to coding pretty fast cause I have done HTML and worked with different systems (php and otherwise) throughout my life. Oh hey, I am looking at your soul-scape site and wow... Very nice. Just everything, design, coding... Everything. Haha, your "mmorpg" looks pretty neat cool. You should put a mailing list up so I can subscribe to its progress. ^_^ Or a RSS feed or something. Lol. Thanks again.
  5. qbit

    PREG_Delete?

    Wow... That works absolutly perfectly. Thank you so much. I realized that I shouldn't be messing around with those... But really, I have taught myself what I know about php in the last few days simply from reading message boards and php sites and referencing other scripts... So I dont really know what I know. All I know is so far I have built an entire backend php system for posting quizzes automatically onto your myspace. I am a tad proud of that. Haha. Now, I have another question for you... It may have less to do with php... But I am not sure. I have a file called "submit.php" (the code you helped me on is part of this file) which basically takes all the questions and answers the user submits and generates a html coded script to be then submitted to myspace's bulletin page. As it stands the user has to press submit on the submit page to send it to myspace. Is there a way for php to automatically send the contents of a textbox (the html form element) via POST to myspace? Here is the code from the submit page: [code] <?php include 'header.php'; ?>     <div class="vertspace"> </div>         <div class="alert"><br>Your quiz has been created!  Press SUBMIT NOW! to send it to your myspace!!<br><br>         <small><font color="#ff0019"><a title="Log Into Myspace" href="http://login.myspace.com/index.cfm?fuseaction=login" target="_blank">-you must be logged in before you press "submit now"-</a></font></small></div>         <div align="center"><form name="bulletinForm" method="post" target="_self" action="http://bulletin.myspace.com/index.cfm?fuseaction=bulletin.edit"><input type="hidden" value="0" name="groupID">         <input class="htmlgenscom" type="hidden" maxLength="50" size="1" value="The Greatest Survey Ever" name="subject"><br>         <textarea class="htmlgenscom" name="body" type="hidden" rows="1" cols="20"> <?php                  echo ('<div style="text-align: center;"><br /><font size="3" style="font-weight: bold; text-decoration: underline; color: rgb(255, 102, 0);"><span style="font-weight: bold; color: rgb(255, 0, 0);">Take This Quiz!</span></font><br /><br />');         echo ('<font size="2" style="color: rgb(0, 0, 255); font-weight: bold;">Do you want to take the quiz below?<br />Without having to copy and paste it?<br />Just go to <font size="3"><a href="http://www.themyspacequiz.com">themyspacequiz.com</a></font>!<br />Its the best place for Myspace quizzes!</font><br /><br /><br /></div><div align="left"><ol>');         foreach ($_POST as $question => $answer)             {             $question = str_replace('_', ' ', $question);                 if($question == 'submit' || $answer == 'Post this survey on your Myspace!')                     {                         continue;                     }                 echo ("<li><b>" . $question . "</b><br>" . $answer . "</li>");             }         echo ('</ol></div><div align="center"><font size="3" style="color: rgb(153, 153, 153);"><b><a href="http://www.themyspacequiz.com">http://www.themyspacequiz.com</a></b></font></div>');         ?> <br /><br />         </textarea><br>         <?php include 'centerad.php' ?>         <br><input type="submit" class="submit" value="SUBMIT NOW!" name="submit" target="_blank"></form></div>         </div> <?php include 'footer.php'; ?> [/code]
  6. I was curious if there was something like "preg_delete" in php... Here is my code where I would like to use something like that: [code] foreach ($_POST as $question => $answer)      {            $question = preg_replace('/_/', ' ', $question);          $question = preg_replace('/submit/', '', $question);            $answer = preg_replace('/Post this survey on your Myspace!/', '', $answer);                {                 echo ("<li><b>" . $question . "</b><br>" . $answer . "</li>");                }      } [/code] Basically instead of saying: [code] $question = preg_replace('/submit/', '', $question); $answer = preg_replace('/Post this survey on your Myspace!/', '', $answer); [/code] I would like to have something that when $question = submit and $answer = post this survey on your myspace, it doesn't echo that variable. I suppost this could work with a if/else statement... But I am really new to php and don't quite understand the ins and outs of coding such a statement. If anyone could help, that would be grand.
  7. Ok, I got a version of that to work. Here is my code: [code] foreach ($_POST as $question => $answer)       {           $question = preg_replace('/_/', ' ', $question);           $question = preg_replace('/submit/', '', $question);           $answer = preg_replace('/Post this survey on your Myspace!/', '', $answer);                        {                           echo ("<b>" . $question . "</b><br>" . $answer . "<br><br>");                     }       } [/code] As for your question to what I ment by submitting twice, it will help if you can "see" the way the variables are passed: [code] Index.php -> (quizX) -> quiz.php -> (question => answer) -> submit.php [/code] Basically submit.php is where the question is. And as it stands, after the user fills in the entries on quiz.php they press submit, which directs them to submit.php where they have to press submit AGAIN. It is the only way I know of submitting the correctly formatted quiz. If there is a way for php to automatically submit a form or something of the like, it would save the user time. The latest version of my entire script can be found here: [a href=\"http://www.bloonlabs.com/myspacequiz/index.php\" target=\"_blank\"]http://www.bloonlabs.com/myspacequiz/index.php[/a] Thanks!!
  8. Basically I am creating a PHP quiz system to submit the quiz results to the myspace post bulliton page to all the quizzer to automatically share the quiz with all his/her friends. I have gotten it to work pretty well, now I am just making the code much cleaner. One of the biggest things is my submit.php page. Basically it takes the data from a quiz then formats a "textbox" and allows the user to press "submit" which then sends the whole thing to myspace. I have two questions about it. First here is my code: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">     <head>         <meta http-equiv="content-type" content="text/html;charset=utf-8" />         <meta name="generator" content="Adobe GoLive" />         <title>Submitting to myspace.....</title>         <link rel="stylesheet" type="text/css" media="screen" href="css.css" />     </head>     <body> <?php $question1 = $_POST['question1']; $question2 = $_POST['question2']; $question3 = $_POST['question3']; $question4 = $_POST['question4']; $question5 = $_POST['question5']; $answer1 = $_POST['answer1']; $answer2 = $_POST['answer2']; $answer3 = $_POST['answer3']; $answer4 = $_POST['answer4']; $answer5 = $_POST['answer5']; echo ('<div align="center"><form name="bulletinForm" method="post" target="_self" action="http://bulletin.myspace.com/index.cfm?fuseaction=bulletin.edit"><input type="hidden" value="0" name="groupID"><input class="htmlgenscom" type="hidden" maxLength="50" size="1" value="The Greatest Survey Ever" name="subject"><br><textarea class="htmlgenscom" name="body" type="hidden" rows="1" cols="20">'); echo ("<b>" . $question1 . "</b><br>" . $answer1 . "<br><br>"); echo ("<b>" . $question2 . "</b><br>" . $answer2 . "<br><br>"); echo ("<b>" . $question3 . "</b><br>" . $answer3 . "<br><br>"); echo ("<b>" . $question4 . "</b><br>" . $answer4 . "<br><br>"); echo ("<b>" . $question5 . "</b><br>" . $answer5 . "<br><br>"); echo ('</textarea><br><br><input type="submit" class="submit" value="Press here to Submit!" name="submit" target="_blank"></form></div>'); ?>     </body> </html> [/code] My first question is how can I go about determining how many "questionX" and "answerX" are passed to my submit.php script. Basically, as it stands I have to manually write additional lines for every addition question that is in my quiz. This does not work well when you have multipul quizzes of different lengths... And since I would prefer not to have multipul submit scripts I would love for the script to automatically figure out how many questions and answers are passed to it and then writing the text area from there. I would think that a php loop would be the best, but I am new at php and am confused how to create a loop that could do this. My second question is how can I make this page AUTOMATICALLY "submit" this whole script to myspace instead of making the user click the "submit" button a second time. Is this possible? You can see my current script here: [a href=\"http://www.bloonlabs.com/myspacequiz/\" target=\"_blank\"]http://www.bloonlabs.com/myspacequiz/[/a] (only quiz 1 has any questions right now)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.