PHP learning!!! - testmy.net resource / tool
Home
Welcome, Guest. Please login or register.
Did you miss your activation email?

 



donations help testmy.net pay for the very high cost to run the site. Any amount is greatly appreciated.
Click to read why...

  spcr
    
News : uglystupid2 Don't look stupid, make sure you keep up-to-date with our rules, please read rules, click here  police October 13, 2008, 09:25:12 AM
testmy.net Broadband  |  Main Forum  |  HELP!  |  Programming and Website Help  |  PHP  |  Topic: PHP learning!!! Advanced search
  0 Members and 1 Guest are viewing this topic. « previous next »
Pages 1 Go Down
Author
Topic: PHP learning!!!  (Read 4160 times)
jim2006
TMN Friend
*
Offline Offline

Gender: Male
Posts: 218


View Profile WWW
« on: February 11, 2005, 10:15:47 PM »

   Ok I have been doing this hole web server,webmaster thing awhile and I have used php before and I have always tryed to get scripts that I found online to work on my server that had php inable and couldn't those were hosting at a hosting company!!! But I finally got a php page to work right!!! It is hosted off of my pc!!! It has php,asp,ftp,MSQL,phpadmin,java,and alot more inabled!!! And it works all fine!!! But anyway I wanted to create this to tell you all that I am learning php and MYSQL database!!! I download a ebook or something that is php for dummies well Im not a dummie but it helped me!!! Know you all can see my php working by going to this link http://shanee861.no-ip.com/test4.php  !!! Check it out!!! And I am not spamming I just want you all to see I got php working finally anyway I need to start reading the book to learn more thanks bye!!!
Logged

Sorry about my spelling!!! But I speak 3 languages!!! French,English,Spanish!!!!

Also if you need to contact me outside this site visit my site at www.[this.site.has.been.blocked.for.spamming] thanks agian!!!
jim2006
TMN Friend
*
Offline Offline

Gender: Male
Posts: 218


View Profile WWW
« Reply #1 on: February 11, 2005, 10:37:12 PM »



    Anyone here know php!!!?
Logged

Sorry about my spelling!!! But I speak 3 languages!!! French,English,Spanish!!!!

Also if you need to contact me outside this site visit my site at www.[this.site.has.been.blocked.for.spamming] thanks agian!!!
jim2006
TMN Friend
*
Offline Offline

Gender: Male
Posts: 218


View Profile WWW
« Reply #2 on: February 12, 2005, 12:56:20 AM »



  Ok I need some help does anyone know how to test to see if MSQL is working right thanks!!!?
Logged

Sorry about my spelling!!! But I speak 3 languages!!! French,English,Spanish!!!!

Also if you need to contact me outside this site visit my site at www.[this.site.has.been.blocked.for.spamming] thanks agian!!!
just-
Vice Admin
TMN Sr. Veteran
*
Offline Offline

Gender: Male
Posts: 3996


ISP - Be ADSL2+ 11.6Mbps - 1.3Mbps


View Profile WWW
« Reply #3 on: February 12, 2005, 12:17:53 PM »

hey jim

welcome to the php world !

i have started learning php for real about 4 weeks now
so basically in 2005 i started learning php and mysql also

i am doing a project of a cinema
so far i have been able to creat all this dynamically



all this code is generated via php

and all the information for each div that shows the movie information is gathered from a mysql page

let me show u some code

<?php

   include ( 'menu.html' );

   // set your infomation.
   $dbhost='localhost';
   $dbusername='root';
   $dbuserpass='';
   $dbname='film';
   
   // connect to the mysql database server.
   $link_id = mysql_connect ($dbhost, $dbusername, $dbuserpass);
   
   // select the specific database name we want to access.
   $dbname=$dbusername."_".$dbname;
   if (!mysql_select_db($dbname)) die(mysql_error());

   $result = mysql_query("SELECT * FROM films");
   
   if ($result === false)
   {
      echo 'Could not run query: ' . mysql_error();
      exit;
   }
   
   echo "\t <div id=\"film\">\n \n";
      
      echo "\t <h2>Film Information:</h2>\n \n";
      
      while ($row = mysql_fetch_row($result))
         {
         echo "\t \t <div id=\"filmdetails\">\n";
         echo "\t \t \t<img src=\"$row[2]\" alt=\"$row[1]\" align=\"left\">\n";   
         echo "\t \t \t<p></p>\n";
         echo "\t \t \t<p>Name: $row[1]</p>\n";
         echo "\t \t \t<p></p>\n";
         echo "\t \t \t".$row[3]."\n";
         echo "\t \t \t<p>Cast:$row[5]</p>\n";
         echo "\t \t \t<p>Book at: <a href=\"book.php?id=assault19\"> 19:00 [/url] <a href=\"book.php?id=assault21\"> 21:00 [/url] <a href=\"book.php?id=assault23\"> 23:00 [/url]  </p>\n";
         echo "\t \t</div>\n";
         echo "\t <p></p> \n \n";
         }
   echo "\t </div>\n";

?>

the thing i am going to do now is when u see book at

<a href=\"book.php?id=assault19\">

i want to get the id assault19 from a database also

should be done by tonight

 ;)
Logged



Download 11.6Mbps
Upload 1.3Mbps

My CPU: http://valid.x86-secret.com/show_oc?id=40752
just-
Vice Admin
TMN Sr. Veteran
*
Offline Offline

Gender: Male
Posts: 3996


ISP - Be ADSL2+ 11.6Mbps - 1.3Mbps


View Profile WWW
« Reply #4 on: February 12, 2005, 12:19:10 PM »

what is the code to change the password or well set the password for root

i tried what i got in a book but it didnt allow me to change

anyone know the mysql command?

can u release it here in a php page please?

thanks in advanced
Logged



Download 11.6Mbps
Upload 1.3Mbps

My CPU: http://valid.x86-secret.com/show_oc?id=40752
just-
Vice Admin
TMN Sr. Veteran
*
Offline Offline

Gender: Male
Posts: 3996


ISP - Be ADSL2+ 11.6Mbps - 1.3Mbps


View Profile WWW
« Reply #5 on: February 12, 2005, 12:28:42 PM »

well done in 2min

if i combine the unique key of the movie plus the hours
i can identify the movie and the time it will play

echo "\t \t \t<p>Book at: <a href=\"book.php?id=$row[0]19\"> 19:00 [/url] <a href=\"book.php?id=$row[0]21\"> 21:00 [/url] <a href=\"book.php?id=$row[0]23\"> 23:00 [/url]  </p>\n";

so when i go on book.php

i can just use $_GET['id'] format this toget the 1st to digit out and the last to digit out
run against the mysql database and identify the time and the movie the guy has click

damn this one was easy to figure out

Logged



Download 11.6Mbps
Upload 1.3Mbps

My CPU: http://valid.x86-secret.com/show_oc?id=40752
j79zlr
Earning Trust
*
Offline Offline

Gender: Male
Posts: 4


View Profile WWW
« Reply #6 on: February 25, 2005, 03:52:30 PM »

Be careful with PHP and inputting variables, if you are using GET and you only want integers as the variables, santize them:

$id=(int)$_GET['id']

That way if you had someone input something malicious, it isn't passed to mysql, e.g.: index.php?id=5 AND DROP *

Which if passed to a  poorly written MySQL query it would be

SELECT * FROM table WHERE id=$id

==

SELECT * FROM table WHERE id=5 AND DROP *

which would erase all of your tables.

You should always set your variables within single quotes:

SELECT * FROM table WHERE id='$id'

Some more:
http://www.devshed.com/c/a/PHP/PHP-Security-Mistakes/

Just some things to think about.
Logged
orangepeel
Earning Trust
*
Offline Offline

Posts: 1


I hate computers.


View Profile WWW
« Reply #7 on: May 11, 2005, 10:51:49 PM »

Yea you should use the addslashes() function as well. Heres a snippet:


$query = "SELECT * FROM table1 WHERE name = '".addslashes($name1)."'";
$result = mysql_query($query) or die ("$query
".mysql_error());
Logged

http:www.fortwaynediningguide.com
donjunior1
New Member
*
Offline Offline

Gender: Male
Posts: 13

QNSExpress.com


View Profile WWW
« Reply #8 on: May 28, 2005, 11:17:33 PM »

If your just starting out php and building a buisness php is GREAT i just tore down my site and im rebuilding from the floor up but at one one time  i hade streaming audio video crazy stuff the works .... check it out do a search on php nuke platinum 7.6 there is a  updated version 7.7but i personaly didnt like it at all it lost the whole sleek look about 50 addons and alott of security frankly i was dissapointed.. its freeware  under the GPL licence and there is a HUGE community that supports  it but if not message me and i can help. have fun and welcome to the php evolution
« Last Edit: May 28, 2005, 11:24:29 PM by donjunior1 » Logged
☻ ◦§1 ☺
Vice Admin
TMN Sr. Veteran
*
Offline Offline

Gender: Male
Posts: 3751


= Red VS Blue =


View Profile WWW
« Reply #9 on: May 29, 2005, 07:21:02 AM »

Do people not look at when the last post was posted....

« Reply #6 on: February 25, 2005, 05:52:08 PM »

« Reply #7 on: May 12, 2005, 12:51:27 AM »

« Reply #8 on: Today at 01:17:11 AM »

 :whaa:



Logged

*~ Member Since: September 20, 2004 ~*
running 10s outbound test (client to server) . . . . . 5.01Mb/s
running 10s inbound test (server to client) . . . . . . 20.62Mb/s

Download Connection is:: 21252 Kbps about 21.25 Mbps Download Speed is:: 2594 kB/s
Upload Connection is:: 4440 Kbps about 4.4 Mbps Upload Speed is:: 542 kB/s


php
Vice Admin
TMN Seasoned Veteran
*
Offline Offline

Gender: Male
Posts: 5126



View Profile
« Reply #10 on: May 29, 2005, 11:29:16 AM »

'fraid not lol...
Logged

donjunior1
New Member
*
Offline Offline

Gender: Male
Posts: 13

QNSExpress.com


View Profile WWW
« Reply #11 on: May 29, 2005, 11:47:34 AM »

yo know for every post i have posted someone has managed to rag on it.... what do you gus do sit there jumping from forum to forum raggin on peeps, its a forum who cares the date and time,  i didnt know we were running on a time limit every one reads them till the forum shuts down its a update on the conversation. because you might know the meaning of life and everything in it dont mean everyone else dose. When i browse forums i dont pay attention to the time if  you do ok but like i said not everyone else dose
Logged
php
Vice Admin
TMN Seasoned Veteran
*
Offline Offline

Gender: Male
Posts: 5126



View Profile
« Reply #12 on: May 29, 2005, 11:51:19 AM »

ok... it annoys me because normally at least once a day, someone posts on a topic thats a month old or older... giving info on something that is long solved... if no one has posted in a topic in over a month, or even a week or two, its probably because the problem was solved and there is no need for more info, or they gave up on it...
Logged

Print  Pages 1 Go Up
testmy.net Broadband  |  Main Forum  |  HELP!  |  Programming and Website Help  |  PHP  |  Topic: PHP learning!!! « previous next »
Jump to:  

    
testmy.net's forum is proudly Powered by SMF | SMF © 2006-2007, Simple Machines LLC
Bookmark: Del.icio.us    StumbleUpon
 
 

 

© 1999-2008 testmy.net - Contact - Legal - Facts & FAQs
Page Loading Stats: This forum Page created in 0.13 seconds with 50 queries.