Re: [INTERFACES] heeeeeeeeeeeeelp meeeeeeeeeeee

Поиск
Список
Период
Сортировка
От Vince Vielhaber
Тема Re: [INTERFACES] heeeeeeeeeeeeelp meeeeeeeeeeee
Дата
Msg-id Pine.OS2.3.96.980629140525.39H-100000@paprika.michvhf.com
обсуждение исходный текст
Ответ на heeeeeeeeeeeeelp meeeeeeeeeeee  ("rony khoury" <rkhoury@apotres.edu.lb>)
Список pgsql-interfaces
On Mon, 29 Jun 1998, rony khoury wrote:

> I will take the problems I got one at a time ,
> ============ 1 ================
> fist I need to conect it to c language , I tried the sample code that
> came with postgresql
> in my program with only the function exit_nicely , when I compile I get
> the following
> message
>
>         tmp/cca006421.o: In function `exit nicely'
>         tmp/cca006421.o(.text+0x8): undefined reference to `PQfinish'
>
> how can I solve that ? should I send some parameters to the c compiler ?


Did you link the postgresql library?  -llibpq

> ============== 2 =================
> second , I read many tutorials about cgi , and still could not find how
> to pass a form from html
> to c language after a submit , i know it is not adequate to ask here ,
> but I'm verry verry verry low
> on time . please reffer me on how to do that .

Since you're running linux, you're probably running apache.  Look in the
apache source dirs and find the sample program that uses util.c.  The
easiest thing for you to do is to use util.c as is and use the few lines
in the program that uses it to parse the cgi.  They'll look something like
this:

    cl = atoi(getenv("CONTENT_LENGTH"));

    for(x=0;cl && (!feof(stdin));x++) {
        m=x;
        entries[x].val = fmakeword(stdin,'&',&cl);
        plustospace(entries[x].val);
        unescape_url(entries[x].val);
        entries[x].name = makeword(entries[x].val,'=');
    }


The resultant items from the form will be in the entries structure.  Name
will be the tag's name and val will be it's value.

Vince.
--
==========================================================================
Vince Vielhaber -- KA8CSH   email: vev@michvhf.com   flame-mail: /dev/null
       # include <std/disclaimers.h>                   TEAM-OS2
   Online Searchable Campground Listings    http://www.camping-usa.com
       "There is no outfit less entitled to lecture me about bloat
               than the federal government"  -- Tony Snow
==========================================================================



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "rony khoury"
Дата:
Сообщение: heeeeeeeeeeeeelp meeeeeeeeeeee
Следующее
От: Constantin Teodorescu
Дата:
Сообщение: Re: [INTERFACES] heeeeeeeeeeeeelp meeeeeeeeeeee