Find Jobs
Hire Freelancers

552179 php edit / debugging


Posted over 12 years ago


Paid on delivery
My script used to save properly until i went with mod rewrite. When i first went to the page i was trying to add info on it displayed some information, but not all. when i went to the datbase and made it the id's matched them to what they are now i got the info to come up. the problem i have now is that when i click save not all info save correctly. here is the peice of code that needs redone. if(isset($_POST['submit'])) { $ptid = $_POST['ptid']; $seas = $_POST['seas']; $award = $_POST['award']; $count = (int)$_POST['count']; mysql_query("TRUNCATE TABLE `awards`"); for($i = 0; $i <= $count; $i++) { if($ptid[$i] != "" && $seas[$i] != "" && $award[$i] != "") { if(strlen($ptid[$i]) == 4) { mysql_query("INSERT INTO `awards` VALUES('1', '', '" . $ptid[$i] . "', '" . $seas[$i] . "', '" . $award[$i] . "')"); } else { mysql_query("INSERT INTO `awards` VALUES('0', '" . $ptid[$i] . "', '', '" . $seas[$i] . "', '" . $award[$i] . "')"); } } } } now you see this line if(strlen($ptid[$i]) == 4) the 4 used to indicate the old team id length 0000 now they are 0 or 00 if i change the 4 to a 1 it saves some info correctly, but not teams with ids of 00. so right now a team id of 12 saves as a player instead of a team so with that problem i am assuming that players with ids of 0 or 00 might save as teams instead of players. right now a player id of say 7 will save as a team not a player and if team id's get into double digits im assuming players with double digits will save as teams as well the old value for a player id was 000000000000
Project ID: 2298125

About the project

1 proposal
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Please check pmb
$40 USD in 0 day
5.0 (17 reviews)

About the client

Flag of CANADA
Vancouver, Canada
Payment method verified
Member since Apr 1, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.