User Profile

Collapse

Profile Sidebar

Collapse
sshade25
sshade25
Last Activity: Oct 12 '12, 09:26 PM
Joined: Nov 27 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • It appears you're right but could you tell me how to do it right? because that is what i really wish to achieve, currently the data pulled from the database is just displaying on the form but not within the select tab.
    The script is meant to output or display information from the database via the two dropdown tabs while the rest of the field are to be entered by the user.
    So I will appreciate if you could give me ideas on how it can be...
    See more | Go to post

    Leave a comment:


  • sshade25
    started a topic dynamic php\html dropdown listing from postgresql
    in PHP

    dynamic php\html dropdown listing from postgresql

    Please I have this problem on my script, It is just pulling the data from the postgresql database but does not place it in the dropdown field created for it on the html form.
    What can possibly be wrong with this script? I have three different forms on this script and just trying to get one to run perfectly

    Code:
    <html>
    <head><title>UG Pipeline Fiedl Data Capture</title>
    </head>
    <body>
    ...
    See more | Go to post

  • sshade25
    started a topic PostgreSQL error: type "nextval" does not exist.
    in PHP

    PostgreSQL error: type "nextval" does not exist.

    Code:
    <html>
        <body>
    <?php
     $PGHOST = localhost;
     $PGDATABASE = "SantaRosaDB";
     $PGUSER = "postgres";
     $PGPASSWORD = "Casabubu25";
     $PGPORT = 5432;
     $db_handle = pg_connect("dbname=$PGDATABASE user=$PGUSER
     password=$PGPASSWORD");
     if ($db_handle) {
     echo 'Connection attempt succeeded.';
     } else {
    ...
    See more | Go to post

  • Sorry Dormilich, but line 10 has to do only with my database connection. I dont have any error on line 10. Postgresql does not accept a separator comma or semicolon, it only accepts space in between the strings.

    The database connection portion of the script which is from line 4 to line 14 runs perfectly okay and report success in connection. My problem lies on line 21 which i dont quite get.

    The script inserts data...
    See more | Go to post

    Leave a comment:


  • You have not said anything different from what i did and i am saying, i have done that but it is not giving me any different solution.

    Please all i need you to do is tell me if i did not put my double quotes right (which i am thinking i did).

    Try and be patient with me, i am not a php expert like you. I am just here to learn from people like you.
    Below is what i have done, i am still not right, please be patient...
    See more | Go to post

    Leave a comment:


  • I have tried what i understand from your example but i am still having the same error on the same line 21 . Please could you check to see if i am getting you right. Here is the code.

    Thanks

    Code:
    $query = "INSERT INTO crops (crop_id,crop_type,crop_name,cultivation_yrs,local_name)VALUES('crop_id','"$crop_type"','"$crop_name"','"$cultivation_yrs"','"$local_name"')";
    See more | Go to post

    Leave a comment:


  • when you said that php expects a dot or semi-colon to extend the string what do you mean exactly.

    I have these but its still giving me the same error

    Code:
    $query = "INSERT INTO crops (crop_id,crop_type,crop_name,cultivation_yrs,local_name)VALUES('crop_id', "$crop_type"; "$crop_name"; "$cultivation_yrs"; "$local_name")";

    Code:
     $query = "INSERT INTO crops
    ...
    See more | Go to post

    Leave a comment:


  • I have tried to enclose the string values in quites but it is giving me this error

    Code:
    $query = "INSERT INTO crops (crop_id,crop_type,crop_name,cultivation_yrs, local_name)VALUES('$crop_id', '"$crop_type"', '"$crop_name"','$cultivation_yrs','"$local_name"')";
     $result = pg_query($query);
    Parse error: syntax error, unexpected T_VARIABLE in C:\ms4w\Apache\ htdocs\php\inpu tcrops.php...
    See more | Go to post

    Leave a comment:


  • sshade25
    started a topic Database table not populating properly by php script
    in PHP

    Database table not populating properly by php script

    I am trying to insert some data into my postgresql database table using an html form and a php script. The problem here is that when the script is run, it does not insert data into the last two coulmns and also it would insert a 0 into the third column.

    but when i run the query directly on the database using this sql

    INSERT INTO crops (crop_id,crop_t ype,crop_name,c ultivation_yrs, local_name)VALU ES('6','food crop','garri',' 6','utara');...
    See more | Go to post
    Last edited by Dormilich; Nov 27 '09, 11:03 AM. Reason: protecting your password

  • sshade25
    started a topic How can i effect Autoincrement in my table

    How can i effect Autoincrement in my table

    I created a table of five columns as follows
    crop_id, crop_type, crop_name, cultivation_yrs , local_name.

    I want to make the crop_id to be the primary key, and also to be autoincremental as well as serve as a reference to a foreign key in the main database table which is a different table altogerther.

    I am able to create the primary key and the foreign key but i am not able to achieve the autoincrement
    ...
    See more | Go to post
No activity results to display
Show More
Working...