Jump to content

robert_gsfame

Members
  • Posts

    876
  • Joined

  • Last visited

Everything posted by robert_gsfame

  1. $row=mysql_query("SELECT * FROM user_table WHERE id='$id'"); change $id into '$id' see if it could help
  2. anyway i still confuse with combobox value :'( Can anyone tell me how to put the value into combobox so that it won't automatically change to first index of the combobox?? Help me explain this
  3. <?php $name = 'FINANCE MANAGER (FM)'; $split = explode(' ', $name); foreach($split as &$part) { $part = ($part{0} != '(') ? ucfirst(strtolower($part)) : $part; } $name = implode(' ', $split); echo $name; I just want to know what ($part{0} refers to ??? and &$part ===> what "&" use for?? thank you. i'm still newbie lOl
  4. COOL ANSWER...!!! i thought there is a command to do this...THANX GUYS
  5. okay i get the value from my database assume that i've connected to my database and i have this $get = mysql_fetch_array($query); $country = $get['country']; then i have my combobox like this inside edit.php <form method = POST> <select name="country" > <option value="Australia" <?php if (!(strcmp("Australia", ""))) {echo "SELECTED";} ?>>Australia</option> <option value="Belgium" <?php if (!(strcmp(Belgium, ""))) {echo "SELECTED";} ?>>Belgium</option> <option value="Burma" <?php if (!(strcmp(Burma, ""))) {echo "SELECTED";} ?>>Burma</option> <option value="Cambodia" <?php if (!(strcmp(Belgium, ""))) {echo "SELECTED";} ?>>Cambodia</option> </select> </form> then what to do??
  6. Opps i have checked it and no value was given....can you help me where should i put the value into
  7. i have my edit page called edit.php inside, i have one combobox to edit user country. The problem is that when user has chosen one of several countries listed for example Belgium, he save it and when he is trying to edit several information inside edit.php while ignoring the country information, why does the combobox value automatically change to first index which is Australia??
  8. any other ideas? i have this problem with strtolower(ucwords what if the strings that i want to manipulate is job title for example : $name = FINANCE MANAGER (FM) if i use echo strtolower(ucwords($name)) then it comes Finance Manager (fm) it should be --------------> Finance Manager (FM) any other ideas?
  9. No it doesn't work if all letters are capital letter.. if $name = JAMES HUGHES GODFREY then if i use ucwords then it will result the same unless i have created $name = james hughes godfrey So does it mean i have to create $name2 = strtolower($name) then ucwords($name2)???? it will need more effort, or do you have any better idea?
  10. hello codemasters... i would like to ask some simple question, how can i change every first letter into capital letter for example : <?php $name = 'JIM HUMPHREY';?> and i would like to make it into this when i call $name using echo Jim Humphrey and how bout if they have 3 words separated with space for example : $name = JIM HUMPHREY GODFREY and it should result Jim Humphrey Godfrey thanks in advance
  11. Can anyone help solve this : i would like to put three parameters for my sqldataadapter, but i really confuse with the " ' " dim da as New SqlDataAdapter("Select * from master where name='" & x & "'""address='" & y & "'""telp='" & z & "'"")
  12. this is what my config.php look like <?php $localhost='localhost'; $username='xxxxxx'; $password='XXXXX'; $database='YYYYYYY'; mysql_connect($localhost,$username,$password); mysql_select_db($database);?> which part is wrong, it seems i don't have any space wrongly placed
  13. i got this code <?php require_once('config.php');?> <?php if(isset($_POST['login'])){ if(empty($_POST['username'])||(empty($_POST['password']))){header('location:failure.php');}}?> when i run it, then this statement appeared CANNOT MODIFY HEADER(HEADER ALREADY SENT can anyone find out which part is wrong? thx
  14. can anyone tell me in detail those steps....Sorry, cause i am not familiar n still new for this thing.. Please help me...
  15. PHP master, i always see on everyone page url typed like this index/login/members i really wonder how they do this that..they don't have *.php and they have slash "/ " is the slash because of the folder where they put file "members" ?? Please explain this to me... THX in advance
  16. i already did what has been written above param = document.getElementById("Name").value param2 = document.getElementById("address").value window.open("data.php?Name=" + param + "&address=" + param2); } does it mean if i want to have another value such as telephone, i just add the parameter so it will looked like this param = document.getElementById("Name").value param2 = document.getElementById("address").value param2 = document.getElementById("telephone").value window.open("data.php?Name=" + param + "&address=" + param2 + "&telephone=" + param3); } i've tried but it didn't work.....then how can i get value of the address with the same format like what written in the textbox.. in php i always use nl2br($_GET['address']) but here didn't work can help me solve this problem?
  17. thank you for your help!! I am still newbie with javascript...
  18. i got simple problem with javascript as i am a newbie, so i need some assist from you <script type="text/javascript" language="javascript"> function _preview(){ param = document.getElementById("name").value param2 = document.getElementById("address").value window.open("mydata.php?name="+param&&address=param2); } </script> confused, can anyone help me.. how to pass those value param and param2
  19. i know that, so how to open a pop up while getting value of the textbox in simple words, how to create 2 submit buttons that each has its own action
  20. does anyone has a clue? i have my form like this <form name = 'form1' method='post' action='submit.php'> <input type = 'text' name='text1'> <input type = 'submit' name='button1'> <input type = 'button' name='button2' onclick=windows.open('preview.php',blablablablablabla) </form> $_POST['text1'] only pass the value when i click the button1, and it goes to submit.php what i want to ask is that how to pass the value inside the textbox to my preview.php once i click on button2? thanx in advance
  21. Yeah i'm trying to pass it through url i've tried and it worked
×
×
  • 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.