Bitcoin Forum
April 25, 2024, 04:12:49 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: PHP Coding question in regards to validat user input before passing it into mysq  (Read 275 times)
retteDenTierpark (OP)
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
December 14, 2019, 08:56:52 PM
 #21

Based on all posted messages, here is an example of a ready-to-use file ( For example, create a file with name "save_address.php" and post this code is there ) :
- https://pastebin.com/zR42RyEk

But a tip, if you do not know PHP, entrust the work to someone who master the field, because it's a blow to integrate security vulnerabilities in your code ( And potential errors ).

dude its not working and why would i echo out the input form if the input isnt valid

i need the input formhow else can suers input the address

i appreciate your help but honestly what should i do with this half ass script?

if you know how to do it post everthing and not just some random shit that isnt doing anything

everybody that posts a question gets an answer
everytime i ask a question i get bullshit answer that i cant use for shit


1714061569
Hero Member
*
Offline Offline

Posts: 1714061569

View Profile Personal Message (Offline)

Ignore
1714061569
Reply with quote  #2

1714061569
Report to moderator
1714061569
Hero Member
*
Offline Offline

Posts: 1714061569

View Profile Personal Message (Offline)

Ignore
1714061569
Reply with quote  #2

1714061569
Report to moderator
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714061569
Hero Member
*
Offline Offline

Posts: 1714061569

View Profile Personal Message (Offline)

Ignore
1714061569
Reply with quote  #2

1714061569
Report to moderator
1714061569
Hero Member
*
Offline Offline

Posts: 1714061569

View Profile Personal Message (Offline)

Ignore
1714061569
Reply with quote  #2

1714061569
Report to moderator
mgoz
Full Member
***
Offline Offline

Activity: 265
Merit: 232


View Profile
December 18, 2019, 06:38:03 PM
Last edit: December 18, 2019, 07:22:22 PM by mgoz
 #22

Goto php.net and read. What he posted would work just fine provided you have db.php and your database table is named address and has a single field called address.

The form is displayed if it hasn't been submitted. It displays confirmation or error based on if address valid or not. Even with the include commented out, I see the form, can submit a non-valid address, and receive an error, with form now hidden, since it was posted.

If you're expecting someone to do all of your work for you and just copying and pasting code from various sources, your db.php include is probably broken too. I would recommend not directly inserting form variables into the database unless you like SQL injection. You should probably also modify what he provided to check whether the data was successfully inserted or not and display error/confirmation based on that. Right now it displays nothing (blank page) when submitting a valid address if the insert fails. That's probably where your confusion lies because you are not reading or understanding the code presented to you, however, it is a perfectly fine working example.

People aren't going to want to help you if you make no attempt to learn and are rude.
Initscri
Hero Member
*****
Offline Offline

Activity: 1540
Merit: 759


View Profile WWW
December 18, 2019, 07:01:01 PM
 #23

Based on all posted messages, here is an example of a ready-to-use file ( For example, create a file with name "save_address.php" and post this code is there ) :
- https://pastebin.com/zR42RyEk

But a tip, if you do not know PHP, entrust the work to someone who master the field, because it's a blow to integrate security vulnerabilities in your code ( And potential errors ).

dude its not working and why would i echo out the input form if the input isnt valid

i need the input formhow else can suers input the address

i appreciate your help but honestly what should i do with this half ass script?

if you know how to do it post everthing and not just some random shit that isnt doing anything

everybody that posts a question gets an answer
everytime i ask a question i get bullshit answer that i cant use for shit




I'll make this simple, either go learn PHP yourself (or come back with a better attitude) OR go hire someone to do it for you.

As of this point, no one should be giving code with the way you have treated the community. TryNinja put a valid effort in to helping you. Your inability to understand the code he provided doesn't make his code bad, it just means you have absolutely zero clue what you are doing, and are expecting everyone to hand code to you while being rude to them at the same time.

----------------------------------
Web Developer. PM for details.
----------------------------------
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!