What happens when CREATE INDEX gets interrupted (manually or accidentally?

Can you help me figure this out? (PHP)?

  • This isnt working out. I'm doing a mad lib using Php. I just kind of started it. I will post the code to my html file ad then the code to my php file. Maybe you can tell me why I'm an idiot and explain to me what I'm doing wrong. Actually I'm not even certain if the code will show up here but I"ll try anyway. HTML file = <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml… <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Mad Lib</title> </head> <body> <form action="../hmwk09/index.php" method="get"> <div> <input name="verb1" type="text" value="a verb"/> <input name="noun1" type="text" value="a noun"/> <input name="noun2" type="text" value="a noun"/> <input name="adverb" type="text" value="an adverb"/> <input name="verb2" type="text" value="a verb"/> <input name="adjective" type="text" value="an adjective"/> <input type="submit" value="What nutty phrase did you create?"/> </div> </form> <hr /> <p><a href="http://validator.w3.org/check/refe… this page</a></p> </body> </html> Php file = <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml… <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Thank You!</title> </head> <body> <h1>Nuttyness</h1> <?php $verb1=$_GET['verb1']; $noun1=$_GET['noun1']; $noun2=$_GET['noun2']; $adverb=$_GET['adverb']; $verb2=$_GET['verb2']; $adjective=$_GET['adjective']; print "I really $verb1 it when my $noun1 gets all up on my $noun2! It $adverb makes me $verb2 $adjective when that happens"; ?> </body> </html> When I click on the submit page after entering the nouns and adjectives, the page just displays "nuttyness" which is in the h1 tags instead of the results I'm wanting.

  • Answer:

    try echo " your text here "; instead of print " your text here"; I have never used print from php other than that, it all looks fine

placefor... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

use "echo" instead of "print" (NEVER use "print" in php!) echo ("I really $verb1 it when my $noun1 gets all up on my $noun2! It $adverb makes me $verb2 $adjective when that happens"); first line after <body> in your php could show the problem: <?php echo ("<pre>" . print_r($_GET) . "</pre>"); ?>

Either add echo statements to see what you're getting $verb1=isset($_GET['verb1']) ? $_GET['verb1'] : ''; echo '$verb1 = '.$verb1.' and it\'s '.strlen($verb1).' long '; or use FirePHP to send things back to the browser to see what they are where. (http://www.firephp.org/ ) (Using double quotes just increases the interpreter's work. Escaping tics (single quotes) and closing quotes runs faster. The beginning of that echo line echoes $verb1, the string including the $, so you'll know what you're looking at if you echo all your variables.) Unless there's a typo I missed, or I'm more tired than I think, it looks as if it should work.

I've just tried it out and it works for me. I really a verb it when my a noun gets all up on my a noun! It an adverb makes me a verb an adjective when that happens Try removing the line: <?xml version="1.0" encoding="UTF-8"?> - some php setups will try to run that as a php script (the <? - even without the php bit, will fire off php) Failing this, the problem is with the php installation, not the script. Is this a commercial hosting plan, or something you have installed on your own computer? Can you right click on the web page, and go to 'view source' to see if you are actually getting the script fed back to your browser to see if php is doing anything at all? If the script is being fed back without php being involved, the < and > from <?php and ?> will hide the code so all you'll see is the <h1>...</h1> line displayed as html.

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.