Jump to content

datalee100

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

datalee100's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. NVM- Fixed that. May have more... I'll edit in a sec.
  2. $sql = "INSERT INTO guestbook (name,email,v_comment,) VALUES ('$name','$email','$comment')"; $result = mysql_query($sql,$dbi); If ($result) I'm getting a random error when I run that part of the code: Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/www/terrify.awardspace.com/store_comment.php on line 43 I've been staring at this for an hour- what have I done wrong now?
  3. Bumping the Thread for, what I hope, is the last bit of support that I will need...
  4. That is a good suggestion... On my other page, the header is called in because it's a viewable file, but this one doesn't call in the header- how do I define the directory without going in and adding the exact loaction of my file?
  5. That got me: Warning: main(ROOT/config.php): failed to open stream: No such file or directory in /home/www/terrify.awardspace.com/store_comment.php on line 18 Fatal error: main(): Failed opening required 'ROOT/config.php' (include_path='.:/usr/local/php4/share/pear') in /home/www/terrify.awardspace.com/store_comment.php on line 18
  6. I didn't think that this would be an issue.... I've written a file require in many different ways and all of them work exept this one. When I say: require 'ROOT./config.php'; I get: Warning: main(ROOT./config.php): failed to open stream: No such file or directory in /home/www/terrify.awardspace.com/store_comment.php on line 18 Fatal error: main(): Failed opening required 'ROOT./config.php' (include_path='.:/usr/local/php4/share/pear') in /home/www/terrify.awardspace.com/store_comment.php on line 18 When I say: require './config.php'; I get: Not allowed to run this file directly. Last, I have it like this in the file that DOES work: require ROOT.'config.php'; But I'm still getting this: Warning: main(ROOTconfig.php): failed to open stream: No such file or directory in /home/www/terrify.awardspace.com/store_comment.php on line 18 Fatal error: main(): Failed opening required 'ROOTconfig.php' (include_path='.:/usr/local/php4/share/pear') in /home/www/terrify.awardspace.com/store_comment.php on line 18 What is it expecting me to do if it works EVERYWHERE else?
  7. Thanks for that... I'm relatively new to coding, so I guess I'm learning a bunch from this project. I hope this'll be the last one: Parse error: parse error, unexpected '/' in /home/www/terrify.awardspace.com/store_comment.php on line 45 echo "<center> Your comment has been added to the system. Congratulations!<br> Click <a href="./guestbook.php">HERE</a> to return to the Guestbook.";
  8. Thanks... I think it worked- something odd is wrong with the page but I'm checking something else out... Another error though: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/www/terrify.awardspace.com/store_comment.php on line 31 On and around that line is the following code: //Check if a name & comment have been entered if ($name=="") { die " Please go back and enter you name."; } if ($comment=="") { die " You never entered a comment..."; } What is wrong now?
  9. Below is the snippet of coding that I am working with. // Fetch and Display the Results from the Database $result = mysql_query("select name, email, v_comment from guest_book ORDER BY id",$dbi); while ($myrow = mysql_fetch_array($result)) { echo "<b>name:</b> $myrow[0]<br> <b>email: </b>$myrow[1]<br> <b>message:</b> $myrow[3] <br><br><hr><br><br>"; } <form name="form1" method="post" action="store_comment.php"> Your Name: <input name="name" type="text" size="15"><br> Your Email ID: <input name="email" type="text" size="15"> Comments : <textarea name="comments" cols="15" rows="3"></textarea> <input type="submit" name="Submit" value="Submit"></form> ?> The first echo calls from the database and displays that- that's working fine. Whenever I try to echo the next part, it gets all weird and parses out on me. The form variables seem to mess with the echoing. In the middle of this php code, what should I do to echo to keep this from parsing and get everything shown?
  10. I started this one a while ago and I was wondering if anyone had any solution to why it's not working when it was before. Please?
  11. Just putting it back to the top if anyone has any ideas... Please help?
  12. Sorry, it's kind-of hidden in there...
  13. I have a code: no changes have been made to it and all of the files need are intact, but it's not working. My code is: <?php $one= $slots[array_rand($slots,1)]; $two= $slots[array_rand($slots,1)]; $three= $slots[array_rand($slots,1)]; echo "<img src=\"/" . $one ."\">\n"; echo "<img src=\"/" . $two ."\">\n"; echo "<img src=\"/" . $three ."\">\n"; ?> Which puts out a set of "cards" (It's a trading card site) that makes a very functional slots game with this code for the rewards: <?php if ($one == $two && $two == $three) { include('rand-cards.php'); echo ' '; include('rand-cards.php'); echo ' '; include('rand-cards.php'); echo ' '; include('rand-cards.php'); echo ' '; if ($one == "ebonycards/slots/05.gif") { include('rand-cards.php'); echo ' '; include('rand-cards.php'); } } ?> The if statement is saying that if there is a special match, such as the red seven on any other game of slots, it will give a different reward. The base is 4 cards and the special is the 4 plus two more. The special match is not showing off a different reward upon execution. There is an include at the top for the randomizer in the slot images, this code is: <?php $slots = array ( "ebonycards/slots/01.gif", "ebonycards/slots/02.gif", "ebonycards/slots/03.gif", "ebonycards/slots/04.gif", "ebonycards/slots/05.gif" ); ?> Simple, basic, and unchanged from before. Why is there suddenly a problem? (The site is http://blackwings.clavis-sama.com/ebonycards/slots.php if you want to visit it and see...)
  14. Thanks, I think... I used an ORDER by name ASC instead of what you said, but I think the advice you gave me spurred me to the right idea... So, Thanks! Topic Resolved!
×
×
  • 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.