Hello to all,
I'm new to php coding and i like it alot. I need help with some noob stuff.
1. Having problem with mysql query after submiting HTML form. It's allways execuding two times, that way i have two identical data in table which i do not wont.
HTML code:
Code: [Select]<form name="kluboviForm" method="post" action="kluboviAction.php">
<input name="predsjednik" type="text"/>
<input name="email" type="text"/>
<input name="kontakt" type="text"/>
<input name="sjedisteKluba" type="text"/>
<input name="imeKluba" type="text"/>
<input type="Submit"/>
</form>
PHP code (kluboviAction.php):
Code: [Select]<?php
mysql_connect(localhost,root,'');
mysql_select_db(ljestvica) or die( "Unable to select database");
mysql_query("INSERT INTO klubovi VALUES ('','a','b','c','d','e')");
mysql_close();
?>
After execuding the submit button on form i get this error in google chrome:
Error 101 (net::ERR_CONNECTION_RESET): Unknown error.
But the query is execudet and table is filed with two identical informations.
2. Is there a way to put php function inside action form? I wont to execude php function after someone submits the form. I wont to delete kluboviAction.php file and use function to put the information in to database without the need to use second file. If there is anothere way to do that please let me know.
3. How to redirect URL after execuding submit button to not show message above?
Any help would be appreciated.
Thanks
PHP form authentication
Hi guys,what am trying to achieve is this: Whenever a user tries to login to my website, an error should be displayed for the first time notifying them to try again. Every time they open the website,
Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doing for the last few weeks. Basically I have searched the web, high and low for a "mail to a
Line break?
Hi, I'm new to the forum and new to php. I'm not sure if I'm using the correct terminology so here it goes. I've created a page with multiple forms that when submitted get emailed to a certain
Export hangs
Hi all, please helpI have a Oracle 10.2.0.3.0 database. When I want to query the dba_segments or dba_directories views Oracle just hangs, and when I do a export that hangs aswell. I did a export
Why is the logic of this simple code not working?
Hey, I'm trying to determine if a table already exists in mysql, but doing a query first with mysql_query, then checking $sql as if it a were TRUE of FALSE. Which I though it would be. My Code
LIMIT $start, 10... how to pass last value queried into next page with GET??
Ok I know how to display the first or last 10 results of a query...$result = mysql_query("SELECT * FROM messages ORDER BY timemsg DESC LIMIT 10");In a perfect world all the rows ID's would
HTML Form Server Side Validation
Hi, Im new here, im currently doing a website for a friend, and I have designed using snippets from different pages a contact form. The contact form performs all my needs at the moment and it has
Aris, Netweaver BPM, Visual composer and X'app
Dear Experts,
Sharing PHP Sessions Across Domains
I am in the process of writing a script to share a php session across various domains I have.The problem I have, is getting php to access the php session. It gives me a persmission error. It seems the
comparing tables across databases sql refinement ideas required
Hi all