Not logged in? Join one of the bigest Law Forums on the Internet! Join Now!   Latest blog post: Research Law Professors Before Choosing Law Schools

Advertisments:




Sponsor Links:

Discount Legal Forms
Discounted Legal Texts


PhP $_POST not working?!?

Dealing with a class action? Discuss it here

PhP $_POST not working?!?

Postby doran » Thu Nov 24, 2011 6:28 pm

Okay here is the HTML code

( not all of it of course, this is just part of it )


<form id="form1" name="form1" method="post" action="includes/edit_game_submit.php">
<div class="form_element_container">
<div class="form_lable">
<label>Game name</label></div>
<div class="form_element"><input class="text_box" name="game_name" type="text" id="game_name<?php echo $r['id'];?>" value="<?php echo $gamename;?>" /></div>
</div>
<div class="form_element_container">
<div class="form_lable">
<label>Slug</label></div>
<div class="form_element"><input class="text_box" name="game_slug" type="text" id="game_slug<?php echo $r['slug'];?>" value="<?php echo $r['slug'];?>"/></div>
</div>


and the MYSQL code

$seo_url = create_seoname($name, $_POST['id'], 'game');
mysql_query("UPDATE ava_games SET name='".escape($_POST['game_name'])."', slug='".escape($_POST['game_slug'])."', description='".escape($_POST['game_descr… url='".$url."', category_id='".$_POST['game_category']."… width='".$_POST['width']."', height='".$_POST['height']."', image='".$img."', published='$_POST[published]', filetype='$ext', instructions='".escape($_POST['game_inst… advert_id = $_POST[game_advert], highscores = $_POST[highscores], mochi_id = '$_POST[mochi_id]', seo_url = '$seo_url' WHERE id='".$_POST['id']."'") or die (mysql_error());
echo 'Success';


The thing is, When i submit this, ALL variables work perfectly EXCEPT game_slug, it allways comes up as empty?!

I've been messing with it for a while, and i'm getting pissed...
doran
 
Posts: 20
Joined: Thu Mar 31, 2011 9:06 pm
Top

PhP $_POST not working?!?

Postby cuartio52 » Thu Nov 24, 2011 6:34 pm

Make sure you aren't using the name "game_slug" for something else, e.g., the name of another HTML tag or JavaScript function.
cuartio52
 
Posts: 8
Joined: Fri Apr 01, 2011 1:26 pm
Top


Return to Class Action

 


  • Related topics
    Replies
    Views
    Last post