Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: delete single user

by bigup401 (Pilgrim)
on May 27, 2020 at 20:33 UTC ( #11117359=note: print w/replies, xml ) Need Help??


in reply to Re: delete single user
in thread delete single user

we dont post here for help because we dont know, we know but we ask for other solution other than you used, like a plan b

alternative option

because i can fix this by doing this

adding $ENV{SCRIPT_NAME} to form and keep values available even if page reloaded, and it works 100% <form action="$ENV{SCRIPT_NAME}" method="post"> <input type="hidden" name="dbid" value="[% name.0%]">

but wanted to use other way if available

if you want to help, you help else if not interested you ignore the question

the thing was values run away after page reload, is there any other option to store values other than $ENV{SCRIPT_NAME}

Replies are listed 'Best First'.
Re^3: delete single user
by marto (Archbishop) on May 27, 2020 at 20:47 UTC

    "if you want to help, you help else if not interested you ignore the question"

    Thankfully you aren't in any position to make demands of people around here.

Re^3: delete single user
by haj (Deacon) on May 28, 2020 at 00:48 UTC
    we dont post here for help because we dont know, we know but we ask for other solution other than you used, like a plan b

    You might want to rephrase that. Your original post starts with "am having a problem". Indeed, you seem to have to climb a few steps of knowledge before you understand what your script is doing.

    I am pretty sure that your script deletes a single user on each button click, so in contrast to your claim you can delete single users. Just compare the content of your database before and after the script ran. Your proposed fix doesn't change that, but doesn't make it worse either, and in any way sending $ENV{SCRIPT_NAME} to the browser has no effect on whether values are stored in a database on the server side.

    If you want to make progress, examine the source of the HTML page which your script writes. Then make careful observations which user gets deleted after a click, and then read the documentation of the param method in CGI.

    the thing was values run away after page reload,

    Which values? Where would you expect them to sit? If you reload a page which came as a response to a POST request, your browser warns you that it needs to resend form data ... and yes, after each such reload, one more user is gone.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11117359]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2020-08-09 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (55 votes). Check out past polls.

    Notices?