Seocheckout

PHP Code Help fix php code to update database

PHP Code Help fix php code to update database

I am new to php and spent hours trying to get some code to work, looking for someone to fix my code so that it works..I have the code below, I am trying to get it to show a random url in an iframe, which i have working...However, for the life of me, I cannot get it to update the associated row and deduct 1 credit.
So, this job is for $15 for someone to fix my code so that it pulls a random url from database and puts it in iframe, and then deducts 1 credit from the ID / row that it pulled the url from.

Below is the code I have...

[code]
 
<?php

include 'config.php'; ?>

<?php

$result = mysqli_query($conn,"SELECT id, url FROM oto_msites order by RAND() limit 1"); ?>

<?php

$i=0;

while($row = mysqli_fetch_array($result)) {

>

<?php

mysqli_query($conn,"UPDATE oto_msites SET credits = credits-1 WHERE id = echo .$id."); ?>



<main>

<iframe border="0" frameborder="0" height="100%" width="100%" id="banner" marginheight="0" marginwidth="0" scrolling="yes" src="<?php echo $row["url"]; ?>"></iframe>

</main>

<?php

$i++;

}

>


Requirements

Get the php code working so that it pulls random url from database to show in iframe and then deducts 1 credit from the id / row that it pulled url from.


Skills Required

php

Bids

hi.
i am an expert php developer.
i can fix your code right now.

here is my porfolio:
https://mohamed-hesham5550.rf.gd/

i got the error. if you hire me it&#39;s take 10 to 15 minutes to fix, looking forward...

hello, i’m maruf, a full-stack web application developer and web designer.
hope i can solve your code problem.
if you order me, need some extra info i will ask you later.

thanks in advance

i will fix your php code within few minutes. i carefully have gone through your job description and willing to work with you. i put all my efforts and skills to develop a masterpiece for you.

looking forward to your positive response and possibly work with you.

thank you so much for your time and consideration.

Bid On Listing Created 4 years ago in Programming

Other jobs by nabennett