Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 686 Vote(s) - 3.44 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Updating database from PHP?

#11
Quote:(07-27-2016, 09:06 PM)Ex094 Wrote:

[To see links please register here]

Oh jeez, I think we got it. You forgot to add the Value attribute to the OPTION tags hence it's returning gamer_tag null I think

Replace this line:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


With this:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Also just in case to make sure inputs are coming correctly, Echo out all the POST variables like:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Okay so it is doing it correctly by pulling in the values

Its outputting like tis

New records created successfully test Recruit [DSxR] 27

but it is still not updating it in the database
Reply

#12
Then it might be that the mysql account you are using to query changes to the database does not have the UPDATE privilege, Try running the query in PHPMyAdmin, then see if the change gets applied there, it might be the permission problem


EDIT: I see your order field is an INT,

Try this line:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


I hope you noticed, I made a mistake in my previous query that I provided for the bind_param, I accidentally added SELECT_ORDER twice and SELECT_GAMERTAG got neglected. I think that might be why it's not updating:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Reply

#13
Ive never ran a query threw PHPMyAdmin . How could I run a statement with out having the form and all in it?
Reply

#14
Quote:(07-27-2016, 09:50 PM)mudrig Wrote:

[To see links please register here]

Ive never ran a query threw PHPMyAdmin . How could I run a statement with out having the form and all in it?

First try out what I just said in the EDIT on my previous post, might as well work
Reply

#15
Quote:(07-27-2016, 09:34 PM)Ex094 Wrote:

[To see links please register here]

Then it might be that the mysql account you are using to query changes to the database does not have the UPDATE privilege, Try running the query in PHPMyAdmin, then see if the change gets applied there, it might be the permission problem


EDIT: I see your order field is an INT,

Try this line:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


I hope you noticed, I made a mistake in my previous query that I provided for the bind_param, I accidentally added SELECT_ORDER twice and SELECT_GAMERTAG got neglected. I think that might be why it's not updating:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Quote:(07-27-2016, 09:55 PM)Ex094 Wrote:

[To see links please register here]

Quote: (07-27-2016, 09:50 PM)mudrig Wrote:

[To see links please register here]

Ive never ran a query threw PHPMyAdmin . How could I run a statement with out having the form and all in it?

First try out what I just said in the EDIT on my previous post, might as well work

Okay I changed it to that and now im getting this
No data supplied for parameters in prepared statement test Recruit [DSxP] 26
Reply

#16
Quote:(07-27-2016, 10:05 PM)Ex094 Wrote:

[To see links please register here]

Quote: (07-27-2016, 10:01 PM)mudrig Wrote:

[To see links please register here]

Okay I changed it to that and now im getting this
No data supplied for parameters in prepared statement test Recruit [DSxP] 26
Did you try both?

Yes I tried both and got the same thing on each.


its almost like no data is being supplied to this now


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

Reply

#17
Quote:(07-27-2016, 10:01 PM)mudrig Wrote:

[To see links please register here]

Okay I changed it to that and now im getting this
No data supplied for parameters in prepared statement test Recruit [DSxP] 26
Did you try both?
Reply

#18
Here's the complete shebang, run this:

HTML:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


PHP:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


If this doesn't work, I can help you over team viewer later. need to get some shut eye
Reply

#19
Alright thanks for all the help I'll try this when I get home and let you know how it goes.
Reply

#20
That worked. Looks like I just had the parameters backwards on that.

Now one more question since you have been so helpful. How would I make this form after submitted go back to same page and Display above form the result from the action of the form submit.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through