+ Reply to Thread
Results 1 to 4 of 4

Thread: php script help

  1. #1
    computerkids is offline x10Hosting Member computerkids is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    54

    php script help

    I have a new php script i put up and need some help if anyone has some time i cant pay.I will thank you though.Pm me and i will give you details and cpanel access thanks i am not very good with php and cant figure this bug out.

  2. #2
    Twinkie is offline Banned Twinkie is an unknown quantity at this point
    Join Date
    Sep 2007
    Location
    Ft. Lauderdale, Florida
    Posts
    1,389

    Re: php script help

    Just post your problem... This is free help. Give us a description of the problem, source code, and thats it
    Last edited by Twinkie; 11-10-2009 at 10:14 AM.

  3. #3
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: php script help

    In the "description of the problem" give (among other things) the expected behavior and actual behavior, which includes any error messages. For code, give a minimal test case.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  4. #4
    computerkids is offline x10Hosting Member computerkids is an unknown quantity at this point
    Join Date
    Jul 2009
    Posts
    54

    Re: php script help

    Forgive my ignorance this is a script in the admin section of a ptc website when it calls http://www.maverickptc.info/admin.php?op=10 then nothing happens.well nothing happens when it callls all admin functions as in op=1 op=2 etc I think that is the code below but i am not a programmer
    you can log into the site at www.maverickptc.info login: admin password:123456 go to members section/then admin/then you will see when you try and change something nothing happens This is just a piece of the code as it is to long for here

    {

    $id=$_GET["id"];
    $option=$_GET["option"];


    if ($option=="edit"){

    ?>


    <?

    $tablae = mysql_query("SELECT * FROM tb_ads where id='$id'"); // selecciono todos los registros de la tabla usuarios, ordenado por nombre

    while ($registroe = mysql_fetch_array($tablae)) { // comienza un bucle que leera todos los registros y ejecutara las ordenes que siguen


    ?>

    <form method="post" action="admin.php?op=2">

    Id: <input type="hidden" name="id" value="<?= $registroe["id"] ?>"><?= $registroe["id"] ?><br>
    Paypal name: <input type="text" name="pname" value="<?= $registroe["paypalname"] ?>"><br>
    Paypal email: <input type="text" name="pemail" value="<?= $registroe["paypalemail"] ?>"><br>
    Plan(number of visits): <input type="text" name="plan" value="<?= $registroe["plan"] ?>"><br>
    URL: <input type="text" name="url" value="<?= $registroe["url"] ?>"><br>
    Description: <input type="text" name="description" value="<?= $registroe["description"] ?>"><br>
    Bold: <input type="text" name="bold" value="<?= $registroe["bold"] ?>"><br>
    Highlight: <input type="text" name="highlight" value="<?= $registroe["highlight"] ?>"><br>
    <br>

    <input type="submit" value="Save">

    </fotm>
    <br><br>
    <?
    }
    ?>

    <?

    }

    if ($option=="delete"){

    //Todo parece correcto procedemos con la inserccion
    $queryz = "DELETE FROM tb_ads WHERE id='$id'";
    mysql_query($queryz) or die(mysql_error());

    echo "<font color=\"#cc0000\"><b>Avertise has been deleted.</b></font><br><br>";
    }


    }
    ?>

    <table>
    <tr>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Id
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    URL
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Description
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Plan (number of visits)
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>

    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>

    </b></font></td>
    </tr>
    <?

    $tabla = mysql_query("SELECT * FROM tb_ads where tipo='ads' ORDER BY id ASC"); // selecciono todos los registros de la tabla usuarios, ordenado por nombre

    while ($registro = mysql_fetch_array($tabla)) { // comienza un bucle que leera todos los registros y ejecutara las ordenes que siguen


    echo "
    <tr>
    <td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">
    ". $registro["id"] ."
    </font></td>
    <td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">
    ". $registro["url"] ."
    </font></td>
    <td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">
    ". $registro["description"] ."
    </font></td>
    <td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">
    ". $registro["plan"] ."
    </font></td>
    <td bgcolor=\"#eeeeee\"><font size=\"2\" face=\"verdana\">";
    ?>
    <form method="post" action="admin.php?op=2&id=<?= $registro["id"] ?>&option=edit">
    <input type="submit" value="Edit">
    </form>
    </font>
    </td>
    <td bgcolor="#eeeeee">
    <form method="post" action="admin.php?op=2&id=<?= $registro["id"] ?>&option=delete">
    <input type="submit" value="Delete">
    </form>
    </td>
    </tr>

    <?

    } // fin del bucle de ordenes



    ?>
    </table>

    <?

    break;
    case (3):

    ?>

    <?

    if (isset($_GET["id"]))
    {

    $option=$_GET["option"];

    if ($option=="delete")
    {

    //Todo parece correcto procedemos con la inserccion
    $queryz = "DELETE FROM tb_contact WHERE id='$id'";
    mysql_query($queryz) or die(mysql_error());

    echo "<font color=\"#cc0000\"><b>Message has been deleted.</b></font><br><br>";


    }

    }

    ?>
    <b>Menssages</b>
    <br><br>
    <table>
    <tr>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Id
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Name
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    E-mail
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Topic
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Subject
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Comments
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>
    Ip
    </b></font></td>
    <td bgcolor="#cccccc"><font size="2" face="verdana"><b>

    </b></font></td>
    </tr>
    <?
    Last edited by computerkids; 11-10-2009 at 11:57 AM.

+ Reply to Thread

Similar Threads

  1. Php script for mail doens't work anymore
    By messa in forum Free Hosting
    Replies: 1
    Last Post: 02-03-2009, 09:43 AM
  2. Photo-Graffix Gallery Php Script...
    By millart in forum Free Hosting
    Replies: 7
    Last Post: 09-17-2008, 11:42 AM
  3. foward mail to a php script
    By ruicos in forum Programming Help
    Replies: 3
    Last Post: 09-13-2008, 07:55 AM
  4. Cannot get php script to work
    By avidgamer in forum Free Hosting
    Replies: 3
    Last Post: 09-03-2008, 04:35 PM
  5. Replies: 3
    Last Post: 03-10-2008, 12:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers