What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » php doubt(i'm still a noob don't worry LOL)

Pages: (2): « First [ 1 ] 2 » Last »
php doubt(i'm still a noob don't worry LOL)
Author: Message:
Jhrono
Veteran Member
*****


Posts: 1791
Reputation: 25
32 / Male / Flag
Joined: Jun 2004
O.P. Huh?  php doubt(i'm still a noob don't worry LOL)
Has the subject says...i'm still a noob and i dont know all fuctions etc...but i am testing php's in a localhost server with apache and mysql installed...well my doubt is...like how do i save a form results to a .txt file or (if you dont bother explaining some basics) how to save anything to Mysql(dont know Sh*t about Mysql)...

Like here is a basic form in Html :
Form.html
(talking about :dodgy:ness eh?:S
<html>
<form action="formresult.php" method="POST">
Your Name <input type="text" name="name" />
Your Age: <input type="text" name="age" />
Hobbies: <input type="text" name="hobbies" />
Hours Spent at Pc per day: <input type="text" name="hours" />
<input type="submit">
</form>
</html>

Formresult.php

Hi <?php echo $_POST["name"]; ?>.
You are <?php echo $_POST["age"]; ?> years old.
Your hobbies are <?php echo $_POST["hobbies"]; ?>
You spend <?php echo $_POST["hours"]; ?> hours a day

Here i wanted to have somthing like a button..Confirm or smtnhg that saved the data..
...
Thanks





02-25-2005 08:14 PM
Profile E-Mail PM Find Quote Report
segosa
Community's Choice
*****


Posts: 1407
Reputation: 92
Joined: Feb 2003
RE: php doubt(i'm still a noob don't worry LOL)
<input type="submit">

to

<input type="submit" value="Go!">

?
The previous sentence is false. The following sentence is true.
02-25-2005 08:35 PM
Profile PM Find Quote Report
Concord Dawn
Veteran Member
*****

Avatar
This is a loopy fruit.

Posts: 1203
Reputation: 16
33 / Male / –
Joined: Feb 2004
RE: php doubt(i'm still a noob don't worry LOL)
I suggest Googleing the motherf***er.
[Image: 7.png]
02-25-2005 09:04 PM
Profile E-Mail PM Find Quote Report
Jhrono
Veteran Member
*****


Posts: 1791
Reputation: 25
32 / Male / Flag
Joined: Jun 2004
O.P. RE: php doubt(i'm still a noob don't worry LOL)
quote:
Originally posted by Segosa
<input type="submit">

to

<input type="submit" value="Go!">



you didnt got me...i want to save the data that people write in the form...
02-25-2005 09:21 PM
Profile E-Mail PM Find Quote Report
Concord Dawn
Veteran Member
*****

Avatar
This is a loopy fruit.

Posts: 1203
Reputation: 16
33 / Male / –
Joined: Feb 2004
RE: php doubt(i'm still a noob don't worry LOL)
Why don't you use this?
[Image: 7.png]
02-25-2005 09:27 PM
Profile E-Mail PM Find Quote Report
segosa
Community's Choice
*****


Posts: 1407
Reputation: 92
Joined: Feb 2003
RE: php doubt(i'm still a noob don't worry LOL)
Don't forget to chmod the dir.
The previous sentence is false. The following sentence is true.
02-25-2005 10:10 PM
Profile PM Find Quote Report
Jhrono
Veteran Member
*****


Posts: 1791
Reputation: 25
32 / Male / Flag
Joined: Jun 2004
O.P. RE: php doubt(i'm still a noob don't worry LOL)
i'll try that one later thank you =)...
anyway i was trying another one..proley it's really full of errors but can anyone tell me whats wrong here? :

<?php
$a = 1
$b = 5
if ($a > $b) {
    echo "A is bigger B";
} elseif ($a == $b) {
    echo "A is as big as B";
}  else {$a < $b) {
    echo "A is smaller then B";
}
?>
02-25-2005 11:05 PM
Profile E-Mail PM Find Quote Report
Concord Dawn
Veteran Member
*****

Avatar
This is a loopy fruit.

Posts: 1203
Reputation: 16
33 / Male / –
Joined: Feb 2004
RE: php doubt(i'm still a noob don't worry LOL)
quote:
Originally posted by johny
i'll try that one later thank you =)...
anyway i was trying another one..proley it's really full of errors but can anyone tell me whats wrong here? :

<?php
$a = 1
$b = 5
if ($a > $b) {
    echo "A is bigger B";
} elseif ($a == $b) {
    echo "A is as big as B";
}  else {$a < $b) {
    echo "A is smaller then B";
}
?>

It should be this:

code:

<?php
$a = 1
$b = 5
if ($a > $b) {
    echo "A is bigger B";
elseif ($a == $b) {
    echo "A is as big as B";
else {$a < $b) {
    echo "A is smaller then B";
}
?>

[Image: 7.png]
02-25-2005 11:20 PM
Profile E-Mail PM Find Quote Report
Chris.1
Full Member
***

Avatar
addicted to the net

Posts: 363
Reputation: 3
36 / Male / –
Joined: Jun 2003
RE: RE: php doubt(i'm still a noob don't worry LOL)
quote:
It should be this:


No it shouldn't! It should be this:

code:
<?php
$a = 1;
$b = 5;
if ($a > $b) {
   echo "a is bigger than b";
} elseif ($a == $b) {
   echo "a is equal to b";
} else {
   echo "a is smaller than b";
}
?>

02-25-2005 11:31 PM
Profile E-Mail PM Web Find Quote Report
Jhrono
Veteran Member
*****


Posts: 1791
Reputation: 25
32 / Male / Flag
Joined: Jun 2004
O.P. RE: php doubt(i'm still a noob don't worry LOL)
Thanks chris for the correction =)
Another doubt sorry...How can i make $a= and $b= various random numbers and that the browser choose one each time it reloads?
thanks...
02-26-2005 12:08 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On