jazzman1
Staff Alumni-
Posts
2,713 -
Joined
-
Last visited
-
Days Won
12
Everything posted by jazzman1
-
I've checked your script and the form has been submitted in the way, I expected to be. Do you use any js debuger tools ?
-
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
@Doc, take a look at this link -> http://www.reg.ca/faq/PhpMyAdminTutorial.html -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
@Doc, I don't know why your database structure looks like this: Array ( o=> u_id [Field] => u_id [1] => int(11) [Type] => int(11) [2] => NO [Null] => NO [3] => PRI [Key] => PRI [4] => [Default] => [5] => auto_increment [Extra] => auto_increment ) Array ( o=> id [Field] => id [1] => int(11) [Type] => int(11) [2] => NO [Null] => NO [3] => [Key] => [4] => [Default] => [5] => [Extra] => ) Array ( o=> site_id [Field] => site_id [1] => int(11) [Type] => int(11) [2] => NO [Null] => NO [3] => [Key] => [4] => [Default] => [5] => [Extra] => ) Array ( etc..... ) I'd give you advise, to create the same table again.. -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Try this: print_r($row[0]['o'], true) -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Change 0 to o in print_r function. print_r($row['o'], true) -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Yes, now is Ok, but why you get multiple arrays in the same object, that's why you cannot insert the data from your form. Give me a result please. //connect to databases $recruit_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxx')or die(mysql_error()); $webspell_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxx', true) or die(mysql_error()); $recruit_db = mysql_select_db('doggysty_recruitment', $recruit_link)or die(mysql_error()); $webspell_db = mysql_select_db('doggysty_site', $webspell_link)or die(mysql_error()); $result = mysql_query('EXPLAIN `doggysty_recruitment`.`applications`', $recruit_link) or die(mysql_error()); $arr = array(); while ($row = mysql_fetch_assoc($result)) { echo '<pre>'.print_r($row[0], true).'</pre>'; } exit; -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Maybe, I'm doing something wrong, put in print_r() in the while loop. //connect to databases $recruit_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxx')or die(mysql_error()); $webspell_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxx', true) or die(mysql_error()); $recruit_db = mysql_select_db('doggysty_recruitment', $recruit_link)or die(mysql_error()); $webspell_db = mysql_select_db('doggysty_site', $webspell_link)or die(mysql_error()); $result = mysql_query('EXPLAIN `doggysty_recruitment`.`applications`', $recruit_link) or die(mysql_error()); $arr = array(); while ($row = mysql_fetch_array($result)) { echo '<pre>'.print_r($row, true).'</pre>'; } exit; -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
The tests, do you make on the local machine or a server ? -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
You have a syntax error, copy/paste this: //connect to databases $recruit_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxx')or die(mysql_error()); $webspell_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxx', true) or die(mysql_error()); $recruit_db = mysql_select_db('doggysty_recruitment', $recruit_link)or die(mysql_error()); $webspell_db = mysql_select_db('doggysty_site', $webspell_link)or die(mysql_error()); $result = mysql_query('EXPLAIN `doggysty_recruitment`.`applications`', $recruit_link) or die(mysql_error()); $arr = array(); while ($row = mysql_fetch_array($result)) { $arr = $row; } echo '<pre>'.print_r($arr, true).'</pre>'; exit; -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Ok, that's correct. Now go to include.php file and copy/paste this code there: $result = mysql_query('EXPLAIN `doggysty_recruitment`.`applications`', $recruit_link) or die(mysql_error()); $arr = array(); while ($row = mysql_fetch_array($result)) { $arr = $row; } echo '<pre>'.print_r($arr, true).'</pre>'; exit; -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Hm.... it's very weird. Open up your phpmyadmin application and go to database named " doggysty_recruitment ", click on the SQL tab and copy/paste this code: EXPLAIN `doggysty_recruitment`.`applications` -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Put in php die() function, to be like this: //connect to databases $recruit_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxxx') or die(mysql_error()); $webspell_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxxxxx') or die(mysql_error()); $recruit_db = mysql_select_db('doggysty_recruitment', $recruit_link) or die(mysql_error()); $webspell_db = mysql_select_db('doggysty_site', $webspell_link) or die(mysql_error()); -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
No, Doc, just assign them to new variables and try again, for example: //connect to databases $recruit_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxxxxxxx'); $webspell_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxxxxxxx', true); $db_name1 = mysql_select_db('doggysty_recruitment', $recruit_link); $db_name2 = mysql_select_db('doggysty_site', $webspell_link); -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
@Doc, I think, I got it. According the file bellow, you're overriding or overwriting (I'm not sure how proper to say in English) mysql_select_db('name'), you must assign it to different variables. //connect to databases $recruit_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxxxxxxx'); $webspell_link = mysql_connect('localhost', 'doggysty_recruit', 'xxxxxxxxxx', true); mysql_select_db('doggysty_recruitment', $recruit_link); mysql_select_db('doggysty_site', $webspell_link); -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Your form fields and data has came from it is just fine. Do you have access to databases through any desktop or browser applications, like phpmyadmin, mysql workbench and etc ? -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
When you execute this code, it can be shown the full structure of table `applicaions` from db name `doggysty_recruitment`. There is something wrong, double check again. $result = mysql_query('EXPLAIN `doggysty_recruitment`.`applications`', $recruit_link) or die(mysql_error()); $arr = array(); while ($row = mysql_fetch_array($result)) { $arr = $row; } echo '<pre>'.print_r($arr, true).'</pre>'; exit; -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Compare, what you want to do. You have to create a new table structure according the html form fields or backward. // form data values [name] => Doc20 [i_name] => Doc [username] => Doc [steam] => N/A [xfire] => bagpiper4414 [email] => doc@test.com [games] => all the games I play [age] => 37 [location] => USA: North Coast [microphone] => 2 [why_join] => Because I like it! [clan_history] => Well, this is my first [recruit_style] => 1 [recruit] => Doggy Style [userIP] => x.x.x.x [time] => 1344143935 [submit] => Send Application // table structure Field] => notes [1] => longtext [Type] => longtext [2] => NO [Null] => NO [3] => [Key] => [4] => [Default] => [5] => -
Try this: <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <style type="text/css"> .draggable { width: 75px; height: 25px; background: silver; padding: 10px; margin-bottom: 2px; } #droppable { position: absolute; left: 250px; top: 0; width: 125px; height: 75px; background: gray; color: white; padding: 10px; } </style> <script> $(document).ready(function() { $("div.draggable").draggable(); $("#droppable").droppable({ drop: function() { alert('dropped'); } }); }); </script> </head> <body style="font-size:62.5%;"> <div id="droppable">Drop here</div> <div class="draggable">Drag me 1</div> <div class="draggable">Drag me 2</div> <div class="draggable">Drag me 3</div> <div class="draggable">Drag me 4</div> </body> </html>
-
Why do you remove all box ? $('.box').remove();
-
Are you sure that your computer or server supports php short tag ?
-
You must define a post method in your html form, by default it's a GET method. In your js script you use jquery post method. $.post('save_profile.php',$(this).serialize(),function(data)
-
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Add this instead of code above. echo '<pre>'.print_r($site_id, true).'</pre>'; $result = mysql_query('EXPLAIN `doggysty_recruitment`.`applications`', $recruit_link) or die(mysql_error()); $arr = array(); while ($row = mysql_fetch_array($result)) { $arr = $row; } echo '<pre>'.print_r($arr, true).'</pre>'; exit; -
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Sorry, I meant to write -> site_id -
If you want an event to work on your page, you should call it inside the $(document).ready() function.
-
HTML Form not inserting to mysql... no errors reported
jazzman1 replied to Doc20's topic in PHP Coding Help
Thanks