Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8805931
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:59:27+00:00 2026-06-14T01:59:27+00:00

I have been trying to get mysql entries to update via php from ios.

  • 0

I have been trying to get mysql entries to update via php from ios. I realize that I have made another question about update commands (see MySQL Update command not working) but this is a VERY different script that I am trying (and much simpler). However, I cannot get this to update either! What am I doing wrong? (ps. I have also tried this command with AND’s instead of commas inbetween the sets and I have also tried $_POST…and I am connecting to my database). Also, I am just trying to figure out how to get the update command working…then I will learn how to sql inject. I have also tried manual values and still nothing.

<?php
$login = $_GET["log1b"];
$dogname = $_GET["dogname"];
$city = $_GET["city"];
$pass = $_GET["pass"];
$dogusername = $_GET["username"];
$mcode = $_GET["mcode"];

$con = mysql_connect("(censored)");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("(censored)", $con);
mysql_query("UPDATE login SET dogname = '$dogname', city = '$city', pass = '$pass', username = '$dogusername', mcode = '$mcode' WHERE login = '$login'");
mysql_close($con);
?>

or in xcode…

  NSString *urlString = [NSString stringWithFormat:@"http://(censored)?username=%@&dogname=%@&mcode=%@&pass=%@&city%@&log1b=%@", fldUsername.text, flddogname.text, fldmcode.text, fldpass.text, fldcity.text, log1b];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T01:59:28+00:00Added an answer on June 14, 2026 at 1:59 am

    I think you are missing a ' around $city.

    Also you may want to use mysql_real_escape_string.

    The syntax looks good to me now. You should try to it manually (using something like MySQL Toad) to make sure the query is valid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get a custom Value from the Custom Field that
I have been trying to migrate a database from Sybase to MySQL. This is
I'm learning mysql and have been trying to get this working, but an error
I have been trying to add data from my ajax query that returns json
I have been trying to get a form in HTML/PHP to process to into
I am new to PHP and have been trying to get a PHP application
I have been trying to run a mySQL query that populates a HTML form
I have been trying to get this code to update, and it just will
I have been trying to get my Arduino/Eclipse environment setup. For some reason I
I have been trying to get a handle on using MVC 4.0 with EF

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.