Yarrgh
Members-
Content Count
22 -
Joined
-
Last visited
About Yarrgh
-
Rank
Newbie [Level 1]
-
Request: Php Submit Script With Save In Host Get Picture form url
Yarrgh replied to farsiscript's topic in Programming
The problem in the getin.php file is that you have html before you tried to send the cookie. If you do that you'll get an error. Try movie everything above the html and then placing the variables where you want them in the html. Example: <?phpinclude "config.php";$username = $_POST['user'];$password = $_POST['pass'];$result = MYSQL_QUERY("SELECT * from news WHERE username='$username'and password='$password'")or die ("Name and password not found or not matched");$worked = mysql_fetch_array($result);if ($worked) {$username = $worked[username];$password = $worked[password];$email = $worked[email];setcookie( "user", "$user", time()+3600, "/", "", 0 );}?><html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><?phpif($worked) {echo "Welcome $username! Your e-mail address is $email";}?></head><body></body></html> -
Here's A Nice And Interesting Way To Make Comments In your php files
Yarrgh replied to Dooga's topic in Programming
I enjoyed the story. Usually when you tell people straight out why to do it and how to do it, they don't seem to grasp the consept like other people may. At least reading it in a story form makes it interesting instead of feeling you're reading it out of a manual. Oh, and thanks for telling me how to make .html and .htm files run php. I have forgotten how to do this. -
It doesn't have to be defined. But it is a security risk. I am assuming you use the 'post' method on your form. If I am wrong ignore this post. If did this, http://blah.com/blah.php?JobRef=blah&ContactNam=blah... and finished out the rest of the values (in your insert query) I could add what ever I want in it. I don't know if you purposely left them off or what, but, always use $_POST[variable]. If you want you can do this $blah = $_POST["blah"] Same applies for cookies. I do have to know what the variable names are, but it can be done.
-
Its ok. I just noticed I read spectre's first post wrong. lol My bad. I though you had the tables already set up. Sorry I couldn't help this time.
-
Its one of my favorite games. There is always something to do. And they are coming out with a new version in the next couple of months
-
Guild Wars doesn't have a monthly fee. You just have to buy the software from the store and thats it.
-
Sorry it takes me so long to respond. I have school and work. Looks like I was beat to it. I guess the first time I could've gave you a code that is more user friendly with the error handling just in case users try to view a project that doesn't exist or what ever. I'd say instead of just displaying an error if it doesn't exist to list the projects with an error near the top telling them that the requested project didn't exist. //check to see if they are trying to view a certain projectif (isset($_GET["id"])) { $id = $_GET["id"]; // Connect to the mysql and select the database mysql_connect ( "localhost" , "" , "" ); mysql_select_db( "projects" ); // Get the data from the database $a = mysql_query("SELECT * from PROJECTS WHERE id = '$id'"); // Put the info into an array for easy use if( $a ) { $info = @mysql_fetch_array($a); } else { list_projects("project doesn't exist"); }}else { list_projects("");}function list_projects($error) { //code to list the projects. $error is the variable to display the error.} But of course you don't need to do this. You could just simply display an error. If I did the function wrong I'm sorry. I'm at school and can't check myself right now
-
I've never had that problem. Right now my tables are empty and mysql_fetch_array() doesn't give any errors. EDIT: I've just noticed that my results are in loops. For example: <?php...$a = mysql_query("SELECT * FROM `news`");$b = mysql_num_rows($a);if ($b > 0) { ...}...?> or <?php...$a = mysql_query("SELECT * FROM `news`");while($blah = mysql_fetch_array($a)) { ...}?> Maybe Spectre is right about it when there isn't anything in the table. I guess I've just always done loops and never really had this problem yet.
-
Can you post the code you are using? Make sure you include line 137 and the mysql stuff before that. I need to look to make sure you didn't change it or I didn't post it right.
-
Its only a one time fee. All the good games cost money. Most games that are free don't have near the quality that people are looking for. Its not like WoW where you have to pay a monthly fee to be able to play it. Plus it is a very fun game. And if you have a slow internet like me, it doesn't lag you. Well, unless some other program decides to update itself
-
I think I may know how to make the link inside the image. <img src ="IMAGE.gif" width ="145" height ="126" alt="" usemap ="#IMAGE-ID" /><map id ="planetmap" name="planetmap"><area shape ="rect" coords ="0,0,82,126" href ="home.htm" target ="_blank" alt="Home" /><area shape ="rect" coords ="90,58,3" href ="aboutus.htm" target ="_blank" alt="About Us" /><area shape ="rect" coords ="124,58,8" href ="blah.htm" target ="_blank" alt="BLAH" /></map> On the image you use make sure you add usemap="#WHATEVER" and then use <map name="WHATEVERYOUPUTINTHEIMAGE"> and then use <area> and change the coords to match where you want linked. I don't know the best way to do this besides trial and error. and then simply change the page it links so and the alts.
-
My favorite is Guild Wars. Its really fun to play addicting. How good you are doesn't depend on how long you play our how much you buy. And its one of the only games that doesn't lag people with slow connections.
-
Php Scripts Free For Every One list of the best php scripts sites
Yarrgh replied to adly3000's topic in Programming
Hot scripts is really nice. The only one I really use. I don't like to use other people scripts unless I'm trying to learn from their code. There has only been a couple of times that I've used them without changing them. But I guess now I can check out some new sites I've never heard of. -
A Really Big Problem In Php Codin Please help me im a starter
Yarrgh replied to vblk's topic in Programming
He copied your first post over and over. Probably just to build up hosting credit. He was warned for spamming by the staff -
You guys should check out Guild Wars. Click Here. I've been playing this game for about a year and have never gotten tired of it. In my opinion it is the best RPG. I'm not talking about the actual story of the game but the skills you need to have from experience. No matter how long you play or how fast you lvl up, it won't matter. You only become good by teamwork. And in my opinion that makes a game good. You can't just play a game for hours and hours and become unstopable. THAT is how a game should be. They are coming out with a new version of the game. Where you can choose up to 2 more characters and there will be a whole new story and explorable areas. I can't wait for the version to come out. They are letting people test out the new professions early but only in pvp characters. You've got to check this game out. It's awesome!