PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 9th, 2013, 07:36 AM
Kennethus Kennethus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 Kennethus Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 h 6 m 6 sec
Reputation Power: 0
Need a php code to display Gp of ten courses using function

My texfield names inclube: ['name'] ['department'] ['regnos'] ['com111'] ['com112'] ['com113'] ['com101'] ['math111'] ['math112'] ['math113'] ['gns127'] ['otm126']
Comments on this post
ptr2void disagrees: Do your own damn homework, slacker!

Reply With Quote
  #2  
Old February 9th, 2013, 03:02 PM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,879 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 2 Weeks 1 Day 18 h 12 m 7 sec
Reputation Power: 581
Post what you have tried and explain what doesn't work. We won't do your homework for you but we will point you in the right direction.
__________________
There are 10 kinds of people in the world. Those that understand binary and those that don't.

Reply With Quote
  #3  
Old February 10th, 2013, 04:08 AM
Kennethus Kennethus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 Kennethus Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 h 6 m 6 sec
Reputation Power: 0
I have tried and isnt working. My code is: <?php
$name=$_POST['name'];
$regnos=$_POST['regnos'];
$department=$_POST['department'];
$com111=$_POST['com111'];
$com101=$_POST['com101'];
$com112=$_POST['com112'];
$com113=$POST['com113'];
$math111=$_POST['math111'];
$math112=$_POST['math112'];
$math113=$_POST['math113'];
$gns127=$_POST['gns127'];
$otm126=$_POST['otm126'];

function grade($grade1){
if($grade1>=70 and $grade1<=100)
{
$grade1="4*4.0";
}elseif($grade1>=70 and $grade1<=74)
{
$grade1="4*3.75";
}elseif($grade1>=65 and $grade1<=74)
{
$grade1="4*3.50";
}elseif($grade1>=65 and $grade1<=69)
{
$grade1="4*3.0";
}elseif($grade1>=60
and $grade1<=64)
{
$grade1="4*2.75";
}elseif($grade1>=50 and $grade1<=54)
{
$grade1="4*2.50";
}
return $grade1;
echo $com111." " .grade($com111). "<br>";
echo $com112." " . grade($com112). "<br>";
echo $com113. " " . grade($com113). "<br>";
echo $com101. " " . grade($com101). " <br>";
echo $math111." " . grade($math111). "<br>;
echo $math112." ". grade($math112). "<br>";
echo $math113." " . grade($math113). "<br>";
echo $gns127." " . grade($gns127). "<br>";
echo $otm126." ". grade($otm126). "<br>";

?>

The program is giving me undefined index in all my $_POST entries. Plz i nid serious help. Tanxs nd God bless!

Reply With Quote
  #4  
Old February 10th, 2013, 04:14 AM
Kennethus Kennethus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 Kennethus Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 h 6 m 6 sec
Reputation Power: 0
Have tried it

Dude,i have tried it and it is giving me undefined index

Reply With Quote
  #5  
Old February 10th, 2013, 04:37 AM
Jacques1's Avatar
Jacques1 Jacques1 is online now
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,868 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 22 h 52 m 23 sec
Reputation Power: 813
Dude, then obviously you aren't POSTing anything to your script. How do you run your script? What's the exact content of $_POST?
Code:
var_dump($_POST);


You need to make an HTML form with a field for each "name", "regnos", "department" etc. And this form has to be sent to your script.

Reply With Quote
  #6  
Old February 10th, 2013, 06:43 AM
Kennethus Kennethus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 Kennethus Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 h 6 m 6 sec
Reputation Power: 0
Tanxs 4 ur help

Brother,plz i still can't get wot u mean. Plz can u help me re-write d code? Tanxs 4 ur help nd may God bless You

Reply With Quote
  #7  
Old February 10th, 2013, 07:48 AM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,879 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 2 Weeks 1 Day 18 h 12 m 7 sec
Reputation Power: 581
Let's start at the beginning. In order for $_POST to have any data in it, you need to submit it with a form. Post the HTML of your form.

Note: Please enclose your code in [ PHP ] tags. See the sticky at the top of this forum. Edit your original post.

Reply With Quote
  #8  
Old February 10th, 2013, 09:38 AM
Kennethus Kennethus is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 Kennethus Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 1 h 6 m 6 sec
Reputation Power: 0
I have goten my form

I have designed my form very well and all is remaining is to create my procesingpage wich is the coding and afta which i add d action 2 my form. My textfied name includes:

name
regnos
department
com101
com112
com111
com113
math111
math112
math113
gns127
otm126
Plz help me with d right code

Reply With Quote
  #9  
Old February 10th, 2013, 09:45 AM
gw1500se gw1500se is online now
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2003
Posts: 2,879 gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level)gw1500se User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Year 2 Weeks 1 Day 18 h 12 m 7 sec
Reputation Power: 581
Not very well as far as I can see. There is no form.

Reply With Quote
  #10  
Old February 10th, 2013, 10:08 AM
Jacques1's Avatar
Jacques1 Jacques1 is online now
pollyanna
Click here for more information.
 
Join Date: Jul 2012
Location: Germany
Posts: 1,868 Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level)Jacques1 User rank is Lieutenant General (80000 - 90000 Reputation Level) 
Time spent in forums: 1 Month 2 Weeks 1 Day 22 h 52 m 23 sec
Reputation Power: 813
Man, sometimes it's like we were f*cking interrogators, who have to beat secret information out of people...
Comments on this post
gw1500se agrees: I'm about to give up on this OP and let someone else with more patience try it. No idea why the OP
refuses to provide relevant information.
ptr2void agrees: No patience for help vampires here either.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Need a php code to display Gp of ten courses using function

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap