Jump to content

" are getting in the way


nadeemshafi9

Recommended Posts

hello guys " are getting in my way, when i create a user in my application, i cant delte him because " get in the way because i pass the user id throgh the querystring get and it affects obviously the SQL string, i tried replacing them char(32) as there called but no luck anyways i wana stop them getting in.

 

i whant to filter out " from a string i tried using count char and stuff like that but i just cant seem to detect them i know there char(32) because i printed them out.

 

can somone show me how to, for instance just redirect if its found in a string, i know how to redirect just not how to find "

 

Thanks very much for any help

 

it is a bit of an emergencey

Link to comment
Share on other sites

Its very hard to understand your question exactly (English not your first language?) but, prior to storing any users inputted data in the database run it through mysql_real_escape_string. This should fix your issue.

 

english is my first language but i had a bottle of vodka last night and have been doing my final year project for 6 days and 6 nights and i am a little bit woosy

Link to comment
Share on other sites

english is my first language but i had a bottle of vodka last night and have been doing my final year project for 6 days and 6 nights and i am a little bit woosy

 

Great. Ever thought about giving it a miss until you sober up?

Link to comment
Share on other sites

my lifes work will come to an end after this one so i cant screw it up, its got AJAX multiple order processing and realtime updates, AJAX fuzzy logic mouseover the item based recordings and reltime advert updating based on your mouse over the items and how long for etc. its prety well documented and i also just finished an ADA fire alarm monitoring system. its these damn small things that get me man at the last moment. looks like im getting somwere please stay tuned as i may need some expert advice.

 

thnx alot man

Link to comment
Share on other sites

1 cracked it

 

Javascript form validation

 

<script language="JavaScript" type="text/JavaScript">

function validate_required(field,alerttxt){

with (field){

pos = value.lastIndexOf("\"")

 

if (value == null || value == "" || pos){

alert(alerttxt);

return false

}

else {

return true

}

}

}

function validate_form(thisform){

with (thisform){

if (validate_required(userid,"UserID contains error")==false){

email.focus();

return false

}

if (validate_required(email,"Email contains error")==false){

email.focus();

return false

}

if (validate_required(password,"Password contains error")==false){

email.focus();

return false

}

}

}

 

</script>

Link to comment
Share on other sites

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.