Jump to content

Recommended Posts

Hi,

 

I have changed it to the following code but it still doesn't work.  Do I need to change the second piece to post_image?

 

if (isset($_POST['image_x'], $_POST['image.x'])) {
    $membername = mysql_real_escape_string(trim($_POST['membername']));

 

<form action="" method="post">
    <?php if($error) echo "<span style=\"color:#ff0000;\">".$error."</span><br /><br />"; ?>
    <label for="membername">Username: </label> <input type="text" name="membername" value="<?php if($_POST['membername']) echo $_POST['membername']; ?>" /><br />
    <label for="password">Password: </label> <input type="password" name="password" value="<?php if($_POST['password']) echo $_POST['password']; ?>" /><br />
    <label for="password2">Retype Password: </label> <input type="password" name="password2" value="<?php if($_POST['password2']) echo $_POST['password2']; ?>" /><br />
    <label for="email">Email: </label> <input type="text" name="email" value="<?php if($_POST['email']) echo $_POST['email']; ?>" /><br /><br />
  <input type="image" value="submit" name="image" src="http://www.ukhomefurniture.co.uk/images/homepageregister.PNG"  >

$_POST['image.x'] doesn't exist and won't ever be set. From the link I posted -

Because foo.x and foo.y would make invalid variable names in PHP, they are automagically converted to foo_x and foo_y. That is, the periods are replaced with underscores. So, you'd access these variables like any other described within the section on retrieving variables from external sources. For example, $_GET['foo_x'].

 

All you need to use is -

 

if(isset($_POST['image_x'])){

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.