1,741 Posted Topics
| |
Re: Where are you calling the javascript function ? | |
Re: 1. You forgot mysql_query in [quote]$result=("SELECT name FROM lydia WHERE nam='$name1'");[/quote] 2. [quote] <input name="text" name="name1">[/quote] Should have been input type="text". And, at the first run, ie., when the script is executed for the 1st time, the query will not output anything since $_REQUEST['name1'] is empty.(or it will output the … | |
Re: The point is, how you are storing the data in the table. [icode]select repair_status from table where job_number = '123' [/icode] will display (the list) of repair_status for job_number 123. | |
Re: First of all, the input types doesn't have an id. So, getElementById will not work. Secondly, this isn't a popup. So, window.opener will not work. Try window.top.location.href . | |
Re: [code=mysql] SELECT * FROM registration WHERE student_ID = '222222222' AND year_of_Study = '1' GROUP BY mod_id ORDER BY academic_year DESC , resit_exam DESC LIMIT 0 , 30 [/code] Doesn't this work ? | |
| |
Re: [code=php] <html> <body> <form method="post" name="test"> <input type="button" name="button1" value="login" onClick="javascript: document.test.action='login.php';document.test.submit();"><input type="button" name="button2" value="Register" onClick="javascript: document.test.action='register.php';document.test.submit();"> </form> </body> </html> [/code] You can do it this way. | |
| |
Re: Whenever a user opens a page, add page's name to the session variable. Since you are adding it to the session, If he opens another window for the same page, redirect him to error page. Eg. [code=php] //This is main.php which has link to page1.php <a href="page1.php">Page 1</a> [/code] This … | |
Re: Have an onchange event for the select box. When the user selects a name, submit the page. $_POST['selectname'] will have the value selected by the user. Then query the table and get the values, print it. | |
Re: [url]http://www.daniweb.com/forums/thread116723.html[/url] same question. See the example. | |
Re: [QUOTE=Suomedia;571991][CODE]$query = "SELECT address_code FROM address WHERE userID= '".$myuserID."'"; $result = mysql_query($query); <td><input type="text" name="PickupAddressPostCode" value="<?php echo $result['address_code']; ?>" /></td>[/CODE] Matti Ressler Suomedia[/QUOTE] That should actually be [code=php] $query = "SELECT address_code FROM address WHERE userID= '".$myuserID."'"; $result = mysql_query($query); $row = mysql_fech_array($result); //or while($row = mysql_fetch_array($result)) if your query … | |
Re: [quote]if (isset($_POST['submit'])) { [/quote] is open and not closed. | |
Re: Right after session_start, print $_SESSION['un'] and tell us what it prints. | |
Re: If you use onload function, it will replace whatever you selected by the default value. What you can do is, check if the user has already selected any value from the listbox. If the user has selected a value already, then make that as "selected", else, make the default as … | |
Re: Maybe the fieldname is wrong. And you need to post your entire code as ryan_vietnow mentioned. | |
Re: Welcome to Daniweb! Post your question in related forum and please read the guidelines. :) | |
| |
Re: Post your question in java forum to get better response :) | |
Re: Welcome to Daniweb ! [quote] Does this site deals with g.i.f images and skin designs???[/quote] You need to be more specific my friend :) | |
Re: Hello shello ! Welcome to Daniweb ! Check [url=http://www.daniweb.com/forums/forum7.html] this [/url] forum and post your question in a relevant forum ! | |
Re: [quote] but my if loof is not getting executed in 2nd page. [/quote] Check your query in page2. See if its correct and it returns atleast 1 record. | |
Re: This is strange. But one thing. [quote] $sqlrow = mysql_fetch_row($sqlresult); <<-- THIS IS LINE 109 -->> if ($sqlrow['CountOfRows'] == 0) { [/quote] You have used mysql_fetch_row. It returns rows as [url=http://www.w3schools.com/php/func_mysql_fetch_row.asp] numeric array [/url]. So, you can't give, $sqlrow['CountOfRows']. You can use [url=http://www.w3schools.com/php/func_mysql_fetch_array.asp] mysql_fetch_array [/url] instead. I am not sure … | |
Re: Why do you want to create a table from php anyway ? Everytime you run your script, it will include table_create.php and tries to create the table all the time. Check this [url=http://dev.mysql.com/doc/refman/5.0/en/create-table.html] link [/url]. Add 'if not exists' in your create table query. | |
Re: Check [url=http://nl.php.net/manual/en/function.mail.php] mail [/url] function in php. | |
Re: [quote]SELECT * FROM details WHERE '$_POST[metode]' LIKE '$_POST[search]'% LIMIT 0, 50 [/quote] I guess $_POST['metode'] is the column name ? Print out the query, execute it in phpmyadmin/ mysql console. Check the result. Oh, also, remove the @ symbol from [quote] $row = @mysql_fetch_array($query)[/quote] | |
Re: [url]http://www.onlamp.com/pub/a/onlamp/2002/05/09/webdb2.html[/url] I haven't tested it, but this is how it works. | |
Re: Check this tutorial. [url]http://www.w3schools.com/php/php_mysql_intro.asp[/url] | |
Re: Tutorial, umm..not sure.. But it can be done using ajax.. In javascript, it can be done this way. Populate 1st dropdown from the database, have an onchange event for the dropdown. Onchange, submit the page. On submit, you can access the value of 1st dropdown, Eg. [icode]$value = $_POST['dropdown1']; [/icode] … |
The End.