Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-19-2004, 08:42 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

Panther...

PANTHer will you make a tutorial, I could really use one. A PHP.
Reply With Quote
  #2  
Old 07-19-2004, 08:56 PM
EDGE is offline EDGE
EDGE's Avatar

Join Date: Feb 2003
Location: North Carolina
Posts: 7,184

Send a message via ICQ to EDGE Send a message via AIM to EDGE Send a message via Yahoo to EDGE
on....?
__________________
Quote:
Voltaire
It is forbidden to kill; therefore all murderers are punished unless they kill in large numbers and to the sound of trumpets.
Reply With Quote
  #3  
Old 07-19-2004, 08:59 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

SRY A PHP TUTORIAL
Reply With Quote
  #4  
Old 07-19-2004, 09:04 PM
EDGE is offline EDGE
EDGE's Avatar

Join Date: Feb 2003
Location: North Carolina
Posts: 7,184

Send a message via ICQ to EDGE Send a message via AIM to EDGE Send a message via Yahoo to EDGE
yeah, about.......? The basics of PHP, what? You can probably find some tutorials on Google
__________________
Quote:
Voltaire
It is forbidden to kill; therefore all murderers are punished unless they kill in large numbers and to the sound of trumpets.
Reply With Quote
  #5  
Old 07-19-2004, 09:09 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

Everything there is to know
Reply With Quote
  #6  
Old 07-19-2004, 09:13 PM
EDGE is offline EDGE
EDGE's Avatar

Join Date: Feb 2003
Location: North Carolina
Posts: 7,184

Send a message via ICQ to EDGE Send a message via AIM to EDGE Send a message via Yahoo to EDGE
I highly doubt Panther is going to write a tutorial on everything there is to know about PHP.
__________________
Quote:
Voltaire
It is forbidden to kill; therefore all murderers are punished unless they kill in large numbers and to the sound of trumpets.
Reply With Quote
  #7  
Old 07-19-2004, 10:24 PM
Matt is offline Matt

Administrator

Join Date: May 2002
Location: Florida
Posts: 7,397

Send a message via MSN to Matt
www.google.com
__________________


Click here for the official member status images!







Quote:
Originally posted by Panther
For your sence of free speech, we will control how much you have here .
Quote:
Originally posted by Steve
fak i clicked it to lol.

the message "this will disable it" should have been put before

sorry
Reply With Quote
  #8  
Old 07-19-2004, 10:49 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

Reply With Quote
  #9  
Old 07-20-2004, 01:14 AM
.enfo. is offline .enfo.
Registered User

Join Date: Jul 2003
Posts: 3,465

Send a message via ICQ to .enfo.
worlds best search engine
__________________


Supporter > < Supporter
Quote:
Originally posted by A TIN OF GAS
enfo... u suck!

p.s. love ya really enfo
Reply With Quote
  #10  
Old 07-20-2004, 09:17 AM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

I also highley doubt I know everything there is to know.
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #11  
Old 07-20-2004, 10:40 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

I'm going to read tutorials on hotwired. and after that if i have questions I will ask you, easier than you writing a tutorial. I'm already started on a guest book. Here take a look :
Code:
<html><head><title>Welcome to my Guest Book!  - Powered by !EliteGuestBookV.1.0.0</title></head>
<body>
<p>Add to my guest book:<p>
<form method="Post" action="guestbook.php">
  Name:<input type="text" name="T1" size="20"></p>
  <p>Email: <input type="text" name="T2" size="20"></p>
  <p>Comments:</p>
  <p><textarea rows="5" name="S1" cols="21"></textarea></p>
  <p>
  <input type="submit" value="Add entry!" name="B1" style="border-style: solid; border-width: 1"><input type="reset" value="Reset Forms" name="B2" style="border-style: solid; border-width: 1"></p>
</form>
<?php
/* Made by -Elite-, visit www.squad-host.com for more info!  Now first we make it so it shows the entries*/
$db = mysql_connect("localhost", "root");

mysql_select_db("mydb",$db);

// display individual record

if ($id) {

   $result = mysql_query("SELECT * FROM guestbook WHERE id=$id",$db);

   $myrow = mysql_fetch_array($result);

   printf("Name: %s\n<br>", $myrow["first"]);

   printf("Email: %s\n<br>", $myrow["email"]);

   printf("Comments: %s\n<br>", $myrow["comments"]);

}Else{
// In case the data doesn't load or there 
// are no entries we'll have text to display
print ("Either the data will not load, or there have been no entries!  Please fill out a entry at the top!);
?>
Just something I'm working on, when it's all finished It will be up for download My first ever script that's actually needed. A guest book.
Reply With Quote
  #12  
Old 07-20-2004, 01:03 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

If you want it to show all the entrys you need to do

while($myrow=mysql_fetch_array($query)) {
echo("Name: ".stripslashes($myrow['name']));
}
..
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #13  
Old 07-20-2004, 01:53 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

I'm starting to understand php, oh yeah...I have many scripts planned for the future.
Reply With Quote
  #14  
Old 07-20-2004, 03:05 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

Would this work as a guest book?
Code:
<html><head><title>Welcome to my Guest Book!  - Powered by !EliteGuestBookV.1.0.0</title></head>
<body>
<p>Add to my guest book:<p>
<?php



if ($submit) {

  // process form

  $db = mysql_connect("localhost", "root");

  mysql_select_db("mydb",$db);

  $sql = "INSERT INTO guestbook (first,email,comments) VALUES ('$first','$email','$comments')";

  $result = mysql_query($sql);

  echo "Thank you! Information entered.\n";

} else{



  // display form



  ?>

<form method="Post" action="guestbook.php">
  Name:<input type="text" name="first" size="20"></p>
  <p>Email: <input type="text" name="email" size="20"></p>
  <p>Comments:</p>
  <p><textarea rows="5" name="comments" cols="21"></textarea></p>
  <p>
  <input type="submit" value="Add entry!" name="B1" style="border-style: solid; border-width: 1"><input type="reset" value="Reset Forms" name="B2" style="border-style: solid; border-width: 1"></p>
</form>
<?php
/* Made by -Elite-, visit www.squad-host.com for more info!  Now first we make it so it shows the entries*/
$db = mysql_connect("localhost", "root");

mysql_select_db("mydb",$db);

// display individual record

$result = mysql_query("SELECT * FROM guestbook",$db);

  while ($myrow = mysql_fetch_array($result)) {

    printf("<a href=\"%s?id=%s\">%s %s</a><br>\n", $PHP_SELF, $myrow["first"], $myrow["email"], $myrow["comments"]);

  }

}


}Else{
// In case the data doesn't load or there 
// are no entries we'll have text to display
print ("Either the data will not load, or there have been no entries!  Please fill out a entry at the top!);
?>
</body>
</html>
Reply With Quote
  #15  
Old 07-20-2004, 03:19 PM
Scott is offline Scott
Scott's Avatar
AKA. Panther

Join Date: Sep 2001
Location: Minneapolis, MN
Posts: 10,922

Yes, heres my version.

Code:
<html><head><title>Welcome to my Guest Book!  - Powered by !EliteGuestBookV.1.0.0</title></head>
<body>
<p>Add to my guest book:<p>
<?

$db=mysql_connect("localhost", "root");

mysql_select_db("mydb",$db);

If($_POST['submit']) {
	
	If($name=="" || $email=="" || $comments=="") {
		
		//If they left the name,email or comments field blank they get this :).
		
		Echo("You did not complete all the fields :). Please go back and try again.");
		
	} Else {

		mysql_query("INSERT INTO guestbook (first,email,comments) VALUES ('$first','$email','$comments')");
		Echo("Thank you! Information entered.\n");
		
	}

} Else {

	?>
	<form method="Post" action="guestbook.php">
	 Name:<input type="text" name="first" size="20"></p>
	<p>Email: <input type="text" name="email" size="20"></p>
	<p>Comments:</p>
	<p><textarea rows="5" name="comments" cols="21"></textarea></p>
	<p>
	<input type="submit" value="Add entry!" name="submit" style="border-style: solid; border-width: 1"><input type="reset" value="Reset Forms" name="B2" style="border-style: solid; border-width: 1"></p></form>
	<?

	$query = mysql_query("SELECT * FROM guestbook");
	
	If(!mysql_num_rows($query)) {
		
		Echo("There are no entrys to display");
		
	} Else {
	
	 	while ($result = mysql_fetch_array($query)) {
		 	extract($result);
		 	// http://us2.php.net/extract/
		 	
	    	Echo("I will show you the entrys now!");
	
	  }

	}
	mysql_free_result($query);
	
}
mysql_close($db);
?>
</body>
</html>
__________________

04' Dodge SRT-4, Mopar Stage 3, 406whp/436wtq
Reply With Quote
  #16  
Old 07-20-2004, 03:45 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

Thanks I'm happy I made my first PHP script, I'm going to add
Code:
If ($first=="" || $email=="" || $comments=="") {
//makes it so if they left it empty they will
//have to redo it, lol learned 
//that from panther
echo ("Not all required forms are filled, you must fill in:  Name, Email, and Comments.");
I hope you don't mind me using that code that i got from your script. If you do just post and i won't use it
Reply With Quote
  #17  
Old 07-25-2004, 07:06 AM
Stu is offline Stu
Resident Member

Join Date: Aug 2003
Posts: 3,319

Can i use that guestbook for mmhq? Pleeeasse
Reply With Quote
  #18  
Old 07-25-2004, 02:08 PM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

lol no reason to make me feel bad
Reply With Quote
  #19  
Old 07-26-2004, 04:34 AM
Stu is offline Stu
Resident Member

Join Date: Aug 2003
Posts: 3,319

well can i? It can say coded by -Elite- at the bottom
Reply With Quote
  #20  
Old 07-26-2004, 09:43 AM
JonM is offline JonM
Registered User

Join Date: Jun 2004
Posts: 2,156

well , if you really want to. I'll whip it up, and make it look nice. Just email me what your colors and stuff on your site look like, and i'll try to whip one up. . Link text, a link, so on.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Panther NaughtyPerry Web design and Programming 3 08-23-2005 01:02 PM
Panther Roshi Delta Force 19 05-07-2004 10:47 AM


All times are GMT -5. The time now is 03:41 AM.




Powered by vBulletin®