Page 1 of 1

URL rewriting

Posted: Tue Jul 24, 2007 3:23 pm
by xiaofei
hi guys, i need a some help on reWRITING my URL.

i have my <a href> linked to "http://www.abcdefg.com/abc.php?data=xyz"

but i want it to appear as "http://www.abcdefg.com/abc.php" and still be able to use $_GET['data']

any help would be great. thanks.

OH, i also have stored procedure that inserts data into a table.
and when i call it with $mysqli->query($insertQuery);
no errors come up, BUT NO data is inserted into the table.

please help.

Posted: Tue Jul 24, 2007 3:40 pm
by Begby
That is impossible. The data has to be in the URL somehow, how else is the webserver going to know what to pass your script?

I don't know the answer to question #2.

Re: URL rewriting

Posted: Tue Jul 24, 2007 6:00 pm
by Chalks
Why not just use $_POST instead?

xiaofei wrote:OH, i also have stored procedure that inserts data into a table.
and when i call it with $mysqli->query($insertQuery);
no errors come up, BUT NO data is inserted into the table.

please help.
could we see the query() function and the value of $insertQuery?

Why not use POST

Posted: Tue Jul 24, 2007 6:28 pm
by xiaofei
i am not using post because i am doing this through a link, and it has to be a link (a href).

the funciton is simply

create myProcedure (IN variableName varchar(100))
begin
insert into tableName (col2, col3, col4)
values (variableName, "NONE" , 0)
end

col1 is auto_increment value, and col4 is either a 0 or 1

Need more information

Posted: Tue Jul 24, 2007 6:53 pm
by yacahuma
I wish I could understand what are you trying to do.

if you have a link like so
http://www.abcdefg.com/abc.php?data=xyz

just have it like that.

if not you can also have a

Code: Select all

<a href="javascript: foo(par1,par2)">link</a>

For the database problem , please post your code.

Posted: Tue Jul 24, 2007 8:01 pm
by xiaofei
but i dont what the user to look at my underlying logic in the search

i will have links: A B C D .....Z
and when users click on A B or C... a list of food names will come up.

the procedure code is jsut as i've listed

Posted: Tue Jul 24, 2007 10:54 pm
by superdezign
xiaofei wrote:but i dont what the user to look at my underlying logic in the search

i will have links: A B C D .....Z
and when users click on A B or C... a list of food names will come up.

the procedure code is jsut as i've listed
That's a strange request, but your only other option is to use sessions (or cookies, but that'd be nearly useless).