Welcome to Official "Darkness" Forum.

 

 
 
HomeRegisterLog in
Top posters
-=Dark Master=-
 
†dArk_r0okiE†
 
†Dark Prince†
 
^DarkLord^
 
dark_kernel™
 
Dark_MessengeR_kHai
 
darknet
 
traxexpulse12
 
xo Dark Scene xo
 
Darkness
 
Latest topics
» Himmatwala .pk. Song
Wed Feb 19, 2014 10:23 am by golmana

» Hentai Games Pc 2013
Sat Feb 15, 2014 4:57 pm by golmana

» FalloutNVUERK.part1.rar
Sat Feb 15, 2014 8:05 am by golmana

» The dark forum must rise again!!
Wed Aug 17, 2011 11:25 am by -=Dark Master=-

» gEntleNES!! :))
Tue Jul 19, 2011 4:05 pm by †dArk_r0okiE†

» Personal/Educational Info here
Sun Jul 03, 2011 12:53 am by Dark_Dragon

»  Get the best web design with the best web design software.
Mon Apr 18, 2011 2:38 pm by RebeccaChirby

» BUHAYIN ULIT ANG DARKNESS
Sat Oct 09, 2010 1:30 pm by Darkness

» HELP!!!!! for gamers only
Sat Feb 06, 2010 1:27 pm by xo Dark Scene xo

Poll
Vote for the MQC band Logo (multi choice allowed)
Logo 1
33%
 33% [ 2 ]
Logo 2
0%
 0% [ 0 ]
Logo 3
0%
 0% [ 0 ]
Logo 4
0%
 0% [ 0 ]
Logo 5
0%
 0% [ 0 ]
Logo 6
17%
 17% [ 1 ]
Logo 7
0%
 0% [ 0 ]
Logo 8
50%
 50% [ 3 ]
Total Votes : 6
December 2016
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
262728293031 
CalendarCalendar

Share | 
 

 PHP SUPPORT TOPIC

View previous topic View next topic Go down 
Go to page : 1, 2  Next
AuthorMessage
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: PHP SUPPORT TOPIC   Thu Jul 30, 2009 5:12 am

Anyone who encounter issues or problems regarding PHP, please do not hesitate to post your question here, I will be more than happy to help as long as I have a spare time.
Back to top Go down
http://www.sidebarmetrics.com
†Dark Prince†
Programmer


Posts : 64
Dark Points : 2796
Reputation : 3
Join date : 2009-07-05
Age : 24

Character sheet
Dark Field: 200

PostSubject: ....   Thu Jul 30, 2009 9:42 am

im really having a hard time on coding in PHP
just like my last quiz in my php class...

i already got the logic but still dont know how to code it Laughing
maybe because the syntax of php is very similar to C language...
cuz when im in my C language class like 3 years ago...i did nt really like progmming back then so i always intend to absent that subject...

but now that i realize that proraming is such a cool thing...
i really want to learn on how to improve my coding on PHP

is it really just Practice and memorization? scratch

"im a slow learner...but i LOVE to learn"...
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Thu Jul 30, 2009 10:05 am

†Dark Prince† wrote:
im really having a hard time on coding in PHP
just like my last quiz in my php class...

i already got the logic but still dont know how to code it Laughing
maybe because the syntax of php is very similar to C language...
cuz when im in my C language class like 3 years ago...i did nt really like progmming back then so i always intend to absent that subject...

but now that i realize that proraming is such a cool thing...
i really want to learn on how to improve my coding on PHP

is it really just Practice and memorization? scratch

"im a slow learner...but i LOVE to learn"...

Well, I believe the answer to your questions is, Both.

Memorize, since you need to put in mind the pre-built functions that PHP has, their purpose, usage, howtos, what are the arguments needed and the parameters to consider.

Practice, they say that practice makes perfect and for me practice can make us get use to and understand well the rules and discover different coding style variations, techniques and logic formulation.

There are many ways that can make us atleast a good programmer, just focus on what you do and what you want to be.

And one of my mentor told me this and want to share with you all.

"Learn 5 Everyday", meaning, learn atleast 5 functions/syntax, their usages, howtos, and implement them on sample programs source code to better understand them I tell you will gain alot! try to think of this... 5 X 30 = 150 X 12 = 1800, breakdown, 5 learnings a days times 30 (stands for the number of days in a month) and time 12 (for the number of months in a year) See! That's Alot!

And above anything else I think one the greatest challenge we all faces and we need to overcome right now is how do we start doing this two (Practice and Memorize)? For me, you have to challenge yourself, to think of, this is your future we are talking about this will be your bread and butter in the near days.

Begin Now! or Never!
Back to top Go down
http://www.sidebarmetrics.com
†Dark Prince†
Programmer


Posts : 64
Dark Points : 2796
Reputation : 3
Join date : 2009-07-05
Age : 24

Character sheet
Dark Field: 200

PostSubject: ....   Thu Jul 30, 2009 11:56 am

i got hit right on the button... Shocked

i think ill have to figure out on what i really want to do with my life.. now
just like what DL said "begin now or never"




"Learn 5 everyday"
these will help alot...
Thanks TS!
Like a Star @ heaven Like a Star @ heaven Like a Star @ heaven Like a Star @ heaven Like a Star @ heaven
Back to top Go down
Dark_MessengeR_kHai
Programmer


Posts : 27
Dark Points : 2744
Reputation : -5
Join date : 2009-07-08
Age : 23
Location : MQC

PostSubject: Re: PHP SUPPORT TOPIC   Thu Jul 30, 2009 12:32 pm

DL about XAMP!!if you dont have a IP folder inside of htdocs what u will do?? just cr8??or it will work without it??I cant run my sample codes scratch Or bka sa browser ko lang Im using IE7
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Thu Jul 30, 2009 7:37 pm

Dark_MessengeR_kHai wrote:
DL about XAMP!!if you dont have a IP folder inside of htdocs what u will do?? just cr8??or it will work without it??I cant run my sample codes scratch Or bka sa browser ko lang Im using IE7

You can create any folder with any name as long as it is inside the HTDOCS folder.

For example:

You created a folder name, MYSITE

Then, on the browser you can run that as...

HTTP://LOCALHOST/MYSITE/YOURFILE.PHP

or

HTTP://127.0.0.1/MYSITE/YOURFILE.PHP

If this won't work try to check your XAMPP CONTROL PANEL if the Apache Web Server is working/running.

Please let me know if it works.
Back to top Go down
http://www.sidebarmetrics.com
-=Dark Master=-
Advanced Programmer


Posts : 102
Dark Points : 2851
Reputation : 15
Join date : 2009-07-05
Age : 30
Location : darkest corner of san roque guagua pampanga

PostSubject: Re: PHP SUPPORT TOPIC   Thu Jul 30, 2009 9:21 pm

wow this is cool! sama ako: ot puru english naman dong! hahaha ahmmm... PHP is lovely... just post any specific question hehehe and we will all discuss about it yeah men! hehe
Back to top Go down
-=Dark Master=-
Advanced Programmer


Posts : 102
Dark Points : 2851
Reputation : 15
Join date : 2009-07-05
Age : 30
Location : darkest corner of san roque guagua pampanga

PostSubject: Re: PHP SUPPORT TOPIC   Thu Jul 30, 2009 9:36 pm

Sir DL ahhmmm... lam mo ba ung ala datapager sa ASP.net? pano ung sa PHP version parang ung sa friendster messages ung may page 1,2,3,4....20, para d ngfaflood ung mga items sa isang page...

Makainggit magPHP la hehehe.....
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Fri Jul 31, 2009 7:55 am

-=Dark Master=- wrote:
Sir DL ahhmmm... lam mo ba ung ala datapager sa ASP.net? pano ung sa PHP version parang ung sa friendster messages ung may page 1,2,3,4....20, para d ngfaflood ung mga items sa isang page...

Makainggit magPHP la hehehe.....

I have created and using a function for that which can generate Pagination on the web page. Mejo mahaba-haba ang code para dun.. hehe.. ^_^. Nga pala "PAGINATION" ang tawag dun.
Back to top Go down
http://www.sidebarmetrics.com
-=Dark Master=-
Advanced Programmer


Posts : 102
Dark Points : 2851
Reputation : 15
Join date : 2009-07-05
Age : 30
Location : darkest corner of san roque guagua pampanga

PostSubject: Re: PHP SUPPORT TOPIC   Fri Jul 31, 2009 3:09 pm

sir sidestep lang sa thesis namin gusto ko lang malaman, i really have no time to research PHP kaya nagtanong nalang ako. May sample pa ba kayo ng code? oh yung function kasi gusto ko malaman un sa php kasi its as important as the primary control diba? kasi nagfloflood ang webpage.
Back to top Go down
Dark_MessengeR_kHai
Programmer


Posts : 27
Dark Points : 2744
Reputation : -5
Join date : 2009-07-08
Age : 23
Location : MQC

PostSubject: Re: PHP SUPPORT TOPIC   Fri Jul 31, 2009 7:19 pm

Tnx a lot DL
cheers
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Sat Aug 01, 2009 1:01 am

-=Dark Master=- wrote:
sir sidestep lang sa thesis namin gusto ko lang malaman, i really have no time to research PHP kaya nagtanong nalang ako. May sample pa ba kayo ng code? oh yung function kasi gusto ko malaman un sa php kasi its as important as the primary control diba? kasi nagfloflood ang webpage.

Yep, meron pa ako nung function na ginagamit ko.. hehe.. cge share ko nalang sa iyo when we meet.

Anyone who needs it, just let me know.
Back to top Go down
http://www.sidebarmetrics.com
dark_kernel™
Programmer


Posts : 51
Dark Points : 2771
Reputation : 0
Join date : 2009-07-04
Age : 21
Location : Pampanga

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 04, 2009 12:32 pm

Just want to ask..how to validate data..in PHP
I already get how to save data in DB
Example:
I have a textbox and Submit button
I click the submit button
the data will be save.. but if that data is already existing in the DB it will tell you that the data already exist..

what is the proper code for this??

tnx..ehehe
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 04, 2009 3:11 pm

dark_kernel™ wrote:
Just want to ask..how to validate data..in PHP
I already get how to save data in DB
Example:
I have a textbox and Submit button
I click the submit button
the data will be save.. but if that data is already existing in the DB it will tell you that the data already exist..

what is the proper code for this??

tnx..ehehe


First you need to determine if the record already exist by selecting values in a column where values are should be unique for example username,

Validate the username if exist using SQL,

Code:
$sql = "SELECT * FROM USERS_TABLE WHERE username = '". $_POST['username'] . "'";

$result = mysql_query($sql);

if(mysql_num_rows($result) > 1)  # If greater than 1 means there is
{                            # an existing user with the same name
echo "Record Already Exist";
}
else
{
echo "Record Does Not Exist"
}

Explanation:

Syntax:
int mysql_num_rows ( resource $result )

Usage:

Retrieves the number of rows from a result set. This command is only valid for statements like SELECT or SHOW that return an actual result set.[b]

Please let me know if this works.
Back to top Go down
http://www.sidebarmetrics.com
-=Dark Master=-
Advanced Programmer


Posts : 102
Dark Points : 2851
Reputation : 15
Join date : 2009-07-05
Age : 30
Location : darkest corner of san roque guagua pampanga

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 04, 2009 10:54 pm

Halimaw ya talaga i sir DL hehehe biruin mo ung short method hehehe. Anu ba yan astig!! tutorial!! hehehe babatak ya i ervin oh hehehe... wala man ngpopost sa dotNet huhuhu... anyway sir alam ko na yung dynamic creation ng crystal reports sa dotNet. Magagamit na yun sa thesis. DB nalang at ready na kami. I hope magPost la rin deng 4th year keni para kukusad para system process namu ing didiscuss Crying or Very sad Crying or Very sad
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 04, 2009 11:05 pm

-=Dark Master=- wrote:
Halimaw ya talaga i sir DL hehehe biruin mo ung short method hehehe. Anu ba yan astig!! tutorial!! hehehe babatak ya i ervin oh hehehe... wala man ngpopost sa dotNet huhuhu... anyway sir alam ko na yung dynamic creation ng crystal reports sa dotNet. Magagamit na yun sa thesis. DB nalang at ready na kami. I hope magPost la rin deng 4th year keni para kukusad para system process namu ing didiscuss Crying or Very sad Crying or Very sad

Sana mu nga... Anyway, Good Job in Researching Though, Turu mukung Crystal Reps ne?... aydu... mabangis na ka din! hehehe... ^_^ IDOL!
Back to top Go down
http://www.sidebarmetrics.com
dark_kernel™
Programmer


Posts : 51
Dark Points : 2771
Reputation : 0
Join date : 2009-07-04
Age : 21
Location : Pampanga

Character sheet
Dark Field: 200

PostSubject: nyahah   Tue Aug 04, 2009 11:08 pm

Big thanks..DL..

ehehe...
woo cheers cheers

also DM..tnx..

more power sa Darkness..
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 04, 2009 11:10 pm

dark_kernel™ wrote:
Big thanks..DL..

ehehe...
woo cheers cheers

also DM..tnx..

more power sa Darkness..

No Problem, Just keep on posting your questions in this thread regarding PHP and let's see what we can do.

Thanks!
Back to top Go down
http://www.sidebarmetrics.com
-=Dark Master=-
Advanced Programmer


Posts : 102
Dark Points : 2851
Reputation : 15
Join date : 2009-07-05
Age : 30
Location : darkest corner of san roque guagua pampanga

PostSubject: Re: PHP SUPPORT TOPIC   Wed Aug 05, 2009 6:34 pm

of course ena naman kasing bangis ng DL hehehe.... let the knowledge flow! naks! makainspire parang opensource tayo d2 hehehe
Back to top Go down
dark_kernel™
Programmer


Posts : 51
Dark Points : 2771
Reputation : 0
Join date : 2009-07-04
Age : 21
Location : Pampanga

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Sat Aug 08, 2009 1:35 pm

hi po..tanong ko lang pano po kunin ang value ng.. textbox pag hindi submit button ang gagamitin??
ex:
<?php

$con = mysql_connect("localhost","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_selectdb("db_php",$con);

$_GET['user'] = $user;
$_GET['pass'] = $pass;

mysql_query("INSERT INTO tbl_user(user, pass) VALUES('$user', '$pass') ");
mysql_close($con);
?>



<form name="f1" method="get">
<input type="text" name="t1">
<input type="text" name="t2">
<a href='home.php?action=add&user=?????&pass=?????' >Save</a>
</form>




tnx po...ehehe
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 11, 2009 7:07 am

dark_kernel™ wrote:
hi po..tanong ko lang pano po kunin ang value ng.. textbox pag hindi submit button ang gagamitin??
ex:
[color=cyan]<?php




tnx po...ehehe

Code:

$con = mysql_connect("localhost","root");
    if (!$con)
    {
        die('Could not connect: ' . mysql_error());
    }
    mysql_selectdb("db_php",$con);

$action = $_GET['action'];  //Get the ACTION, for this ex. the action is ADD.
$user = $_GET['user'];      // GET User
$pass = $_GET['pass'];      // Get Password

switch($action)
{
    case 'ADD':
      // CODE FOR ADD!
      mysql_query("INSERT INTO tbl_user(user, pass) VALUES('$user', '$pass') ");
    mysql_close($con);
    break;
}

?>

<form name="f1" method="get">
<input type="text" name="t1">
<input type="text" name="t2">
<a href='home.php?action=add&user=?????&pass=?????' >Save</a>
</form>[/color]

Hope this helps...
Back to top Go down
http://www.sidebarmetrics.com
dark_kernel™
Programmer


Posts : 51
Dark Points : 2771
Reputation : 0
Join date : 2009-07-04
Age : 21
Location : Pampanga

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 11, 2009 9:19 am

tnx po DL.
sir tanong ko lang ung right code nito
ung may ?????
<a href='home.php?action=add&user=?????&pass=?????' >Save</a>
tnx po
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 11, 2009 9:30 am

dark_kernel™ wrote:
tnx po DL.
sir tanong ko lang ung right code nito
ung may ?????
<a href='home.php?action=add&user=?????&pass=?????' >Save</a>
tnx po

Parameter kasi mga yan.. usually, ginagamit ang ganyang query string sa pag update ng record, bale e que-query mo muna yung IDs ng username, not necessarily yung password, question, ano ba ang gagawin mo bakit mo kailangan ng ganyan?
Back to top Go down
http://www.sidebarmetrics.com
dark_kernel™
Programmer


Posts : 51
Dark Points : 2771
Reputation : 0
Join date : 2009-07-04
Age : 21
Location : Pampanga

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Tue Aug 11, 2009 10:56 am

kc sir gusto ko sana sa halip na submit button gamitin ko..e. link nalang kpag..
mag sasave ako..
Back to top Go down
^DarkLord^
Programmer


Posts : 54
Dark Points : 2783
Reputation : 6
Join date : 2009-07-03
Age : 33

Character sheet
Dark Field: 200

PostSubject: Re: PHP SUPPORT TOPIC   Wed Aug 12, 2009 2:22 am

dark_kernel™ wrote:
kc sir gusto ko sana sa halip na submit button gamitin ko..e. link nalang kpag..
mag sasave ako..

Hindi ko ma-e-su-suggest yan na gawin mo.. since masyado siyang risky pagdating sa hack, kasi expose ang mga data mo like yung username and password mo sa query string mo... I suggest to use pa din ang submit button and post method... para naka hide ang data mo...
Back to top Go down
http://www.sidebarmetrics.com
Sponsored content




PostSubject: Re: PHP SUPPORT TOPIC   Today at 9:54 am

Back to top Go down
 
PHP SUPPORT TOPIC
View previous topic View next topic Back to top 
Page 1 of 2Go to page : 1, 2  Next
 Similar topics
-
» Good Effort and Good Support
» Another new person topic
» 2012 v8 Supercar TCL support series
» Topic : Is it Reality... or Fantasy? ArmA 3 Engine
» Charity Event - Please support

Permissions in this forum:You cannot reply to topics in this forum
  :: Programming Support-
Jump to: