PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I've tried the examples from several other posts and have had zero success so I figured that I would start from scratch
I need a snippet of code that I can throw into a page that asks for a user ID or card# I then need the code to append that # onto a url that is hard coded into the snippet and direct the user to the resulting url.
Any help is GREATLY appreciated as I have run out of ideas and tried the answers from post similar to mine without luck.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Is cart.html the file with this code or is it some other something that you downloaded or wrote?
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
EricC wrote:cart.html is just the file that this code is sitting in. It is an empty page save the snippet that you provided.
Well, most web servers will not parse/execute PHP code unless the file is a .php extension. Try that.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Ok I just created cart.php and pasted the code into that.
Warning: Cannot modify header information - headers already sent by (output started at /home/content/E/c/a/Ecanha/html/cart.php:9) in /home/content/E/c/a/Ecanha/html/cart.php on line 12
EricC wrote:Ok I just created cart.php and pasted the code into that.
Warning: Cannot modify header information - headers already sent by (output started at /home/content/E/c/a/Ecanha/html/cart.php:9) in /home/content/E/c/a/Ecanha/html/cart.php on line 12
was returned
Then you have a bunch of other stuff in that file that I am unaware of, because my code was only 11 lines long and unable to have an error on line 12.
Last edited by AbraCadaver on Fri Dec 04, 2009 9:28 pm, edited 1 time in total.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
You can't have any output (html tags, echo anything, etc...) before the header(). So move all of the HTML to the bottom. If the form is posted then the PHP will execute, if not then the HTML will be displayed.
-Shawn
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.