Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > PHP Development
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 08-23-2006, 02:56 PM   #21 (permalink)
penguinsrule
Junior Member
 
Join Date: Aug 2006
Posts: 19
Default Re: PHP form for entering data to MySQL database

thank you so much you helped me understand php and mysql and soon i will be taking a course in it thanks

you know when you seach data eg

id name Gender
1 john male
2 bob male
3 Sue female
4 Michael male
5 Matthew male


and your query result female only

id name Gender
3 Sue female

Last edited by penguinsrule : 08-23-2006 at 02:59 PM.
penguinsrule is offline   Reply With Quote
Sponsored Links
Old 08-23-2006, 03:04 PM   #22 (permalink)
No0oB
Junior Member
 
Join Date: May 2006
Location: Near Frankfurt
Posts: 26
Send a message via ICQ to No0oB Send a message via MSN to No0oB
Default Re: PHP form for entering data to MySQL database

PHP Code:
$sql "SELECT * FROM tablename WHERE gender = 'female'"

Substitute tablename. In case gender is not the name of the field, substitute that as well.
__________________
No0oB
Cafe Vienna
Cafe Heidelberg
No0oB is offline   Reply With Quote
Old 08-23-2006, 05:23 PM   #23 (permalink)
penguinsrule
Junior Member
 
Join Date: Aug 2006
Posts: 19
Default Re: PHP form for entering data to MySQL database

*********YOUR POST HAS BEEN EDITED PLEASE USE THE CORRECT TAGS FOR PHP********
As you are very cleaver how do you get $name2 to go into the function
its sends it accross like this
send.php?file=11&file2=db11

PHP Code:
<?php
$name2 
$_GET['file2'];
function 
scandir($dirstr) {
        
passthru("/usr/bin/count.sh $name2 2>&1 ");

        echo 
"</pre>\n";
}

                
scandir("$fullpath");
?>
Thanks for the help
penguinsrule is offline   Reply With Quote
Old 08-23-2006, 06:03 PM   #24 (permalink)
No0oB
Junior Member
 
Join Date: May 2006
Location: Near Frankfurt
Posts: 26
Send a message via ICQ to No0oB Send a message via MSN to No0oB
Default Re: PHP form for entering data to MySQL database

you mean in this passthru?
I'd try following
PHP Code:
passthru("/usr/bin/count.sh/".$name2."2>&1 "); 
But it looks really weird to me, as you have a file with .sh ending. So basically, there shouldnt come anything afterwards.... or no? o0
__________________
No0oB
Cafe Vienna
Cafe Heidelberg

Last edited by No0oB : 08-23-2006 at 06:16 PM.
No0oB is offline   Reply With Quote
Old 08-23-2006, 06:17 PM   #25 (permalink)
penguinsrule
Junior Member
 
Join Date: Aug 2006
Posts: 19
Default Re: PHP form for entering data to MySQL database

ill try it now the file type is correct dont worry its a script
Tryed it didnt work shame
this is what it is before
passthru("/usr/bin/count.sh/ tel458 2>&1 ");

Last edited by penguinsrule : 08-23-2006 at 06:21 PM.
penguinsrule is offline   Reply With Quote
Old 08-23-2006, 07:08 PM   #26 (permalink)
No0oB
Junior Member
 
Join Date: May 2006
Location: Near Frankfurt
Posts: 26
Send a message via ICQ to No0oB Send a message via MSN to No0oB
Default Re: PHP form for entering data to MySQL database

I would say youre missing a comma somewhere
Quote:
Originally Posted by php.net
void passthru ( string command [, int &return_var] )
Thats the structure of your function
__________________
No0oB
Cafe Vienna
Cafe Heidelberg
No0oB is offline   Reply With Quote
Old 08-23-2006, 07:12 PM   #27 (permalink)
penguinsrule
Junior Member
 
Join Date: Aug 2006
Posts: 19
Default Re: PHP form for entering data to MySQL database

yeah but it works if you put the name maunaly

PHP Code:
<?php
$name2 
$_GET['file2'];
function 
scandir($dirstr) {
       
passthru("/usr/bin/count.sh nameoffile 2>&1 ");

        echo 
"</pre>\n";
}

                
scandir("$fullpath");
?>
penguinsrule is offline   Reply With Quote
Old 08-23-2006, 09:10 PM   #28 (permalink)
No0oB
Junior Member
 
Join Date: May 2006
Location: Near Frankfurt
Posts: 26
Send a message via ICQ to No0oB Send a message via MSN to No0oB
Default Re: PHP form for entering data to MySQL database

[quote=No0oB]
PHP Code:
passthru("/usr/bin/count.sh ".$name2." 2>&1 "); 
Well then try this, when its the correct scheme
__________________
No0oB
Cafe Vienna
Cafe Heidelberg
No0oB is offline   Reply With Quote
Old 08-23-2006, 09:46 PM   #29 (permalink)
penguinsrule
Junior Member
 
Join Date: Aug 2006
Posts: 19
Default Re: PHP form for entering data to MySQL database

hi found soltion
thanks for your great effort kept me think thanks, weird .sh that what made this time different. How can you totla the size of a field i have no clue

<?php
$name2 = $_GET['file2'];
function scandir($name) {
passthru("/usr/bin/count.sh $name 2>&1 ");

echo "</pre>\n";
}

scandir("$name2");
?>
penguinsrule is offline   Reply With Quote
Old 08-25-2006, 01:21 PM   #30 (permalink)
No0oB
Junior Member
 
Join Date: May 2006
Location: Near Frankfurt
Posts: 26
Send a message via ICQ to No0oB Send a message via MSN to No0oB
Default Re: PHP form for entering data to MySQL database

Which field do you mean?
__________________
No0oB
Cafe Vienna
Cafe Heidelberg
No0oB is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display mysql table fields and data goldfish PHP Development 6 05-14-2008 04:49 AM
Build a web database without any programming experience required xacto Advertise or Request 0 06-29-2005 09:25 PM
Listing mysql data using php kayla Other Programming - Perl, C++, Java, ASP, .NET Development 1 06-26-2005 10:07 PM


» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 07:14 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums