Find Jobs
Hire Freelancers

Convert 1 page from mySql to PDO

₹600-1500 INR

Closed
Posted over 7 years ago

₹600-1500 INR

Paid on delivery
This should be a quick fix for a good programmer. Please read instructions carefully. I have 1 website that is working now. It uses the following code in MySQL and it works perfectly. I also have a NEW website that uses PDO. I would like this code converted to PDO so that it does the same thing, just written in PDO. I am going to hire, pay, and leave 5 star positive feedback for the first programmer who can deliver working code in PDO format. I understand very little about programming and this is why I cannot do this myself. Contract price is $5.00 or less. If you bid less, I will test your code first. <form name='input' method='post' action=''> <input type='hidden' name='userID' /> <div align="center"><?=$error?></div> <table border=0 cellspacing=2 cellpadding="2" style='border:2px solid black;'> <tr style="font-weight:bold"> <td><center>Name</th> <th>Day</th> <th>Date</th> <th>Hrs. Worked</th> <th>Description of Work </th> <td>Submit</th> <td>Remaining</th> </tr> <?php if (isset($_POST['userID'])) { mysql_query(' insert into timesheet set userID = ' . $_POST['userID'] . ', day = "' . $_POST['day_' . $_POST['userID']] . '", date = "' . $_POST['date_' . $_POST['userID']] . '", hours = "' . $_POST['hours_' . $_POST['userID']] . '", description = "' . $_POST['description_' . $_POST['userID']] . '", status = 1, worksite = "' . $info['worksite'] . '" ') or print(mysql_error() . '<br /><br />'); } $userID = $info['ID']; $i=1; $query=mysql_query("SELECT firstname,lastname,hours,ID FROM `users` where type='volunteer' and worksite='".$info['worksite']."' ORDER BY 2,3 ASC"); while($row = mysql_fetch_assoc($query)) { $select_hrs = mysql_query("select sum(hours) as completed_hours from timesheet where worksite='".$info['worksite']."' and status=1 and userID='".$row['ID']."'") or die(mysql_error()); $hrs = mysql_fetch_assoc($select_hrs); $remaining_hours = $row['hours'] - $hrs['completed_hours']; $date_query = "select date from timesheet where ID = (select max(ID) from timesheet where worksite='".$info['worksite']."' and status=1 and userID='".$row['ID']."') "; //echo $date_query;die(); $select_date = mysql_query($date_query) or die("2".mysql_error()); $get_date = mysql_fetch_assoc($select_date); if($remaining_hours > 0) { ?> <tr bgcolor=<? $k = $i%2; if($k == 1) { $color= "#FFFFFF"; } else { $color = "#EBEDF3"; } echo $color?> > <td align='center'><?=$row['firstname']." ".$row['lastname']?></td> <td align='center'> <select name='day_<?php echo $row['ID'] ?>'> <option value="Monday" <? if(date('N') ==1){ echo "selected";}?>>Monday</option> <option value="Tuesday" <? if(date('N') ==2){ echo "selected";}?>>Tuesday</option> <option value="Wednesday" <? if(date('N') ==3){ echo "selected";}?>>Wednesday</option> <option value="Thursday" <? if(date('N') ==4){ echo "selected";}?>>Thursday</option> <option value="Friday" <? if(date('N') ==5){ echo "selected";}?>>Friday</option> <option value="Saturday" <? if(date('N') ==6){ echo "selected";}?>>Saturday</option> <option value="Sunday" <? if(date('N') ==7){ echo "selected";}?>>Sunday</option> </select> </td> <!-- <script>DateInput('date', true, 'DD-MON-YYYY')</script> --> <td><script>DateInput('date_<?php echo $row['ID'] ?>', true, 'MM/DD/YYYY')</script></td> <th bgcolor="green"><input name='hours_<?php echo $row['ID'] ?>' type="text" value="" size="6"</th> </th> <td><input name='description_<?php echo $row['ID'] ?>' type="text" value="" size="20"></td> <td bgcolor="green"><input type='button' value='Submit' onclick='[login to view URL] = "<?php echo $row['ID'] ?>"; [login to view URL]();'></td> <td align='center'><?=$remaining_hours?></td> <!-- <td bgcolor="yellow"><input type="button" value="Time" onClick="javascript:window.location.href='[login to view URL]<?=$row['ID']?>'"></td> </tr> --> <?php } $i++; } ?>
Project ID: 12105324

About the project

5 proposals
Remote project
Active 7 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
5 freelancers are bidding on average ₹1,010 INR for this job
User Avatar
I can have this done today. I have hundreds of hours of experience with PDO and understand how to implement it correctly.
₹600 INR in 1 day
5.0 (2 reviews)
3.4
3.4
User Avatar
Hi. Understood what you want. I often use PDO (MySQL) in my projects. I can make for you in max 2 hours.
₹600 INR in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
I have 2 years of experience in PHP and database. Please give me an opportunity. I am new as freelancer so in my profile there is no project but I am doing job as software developer. I hope you will give me an opportunity Thank you
₹1,300 INR in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of INDIA
DINANAGAR, India
5.0
9
Member since May 1, 2016

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.