389 Posted Topics
Re: you have several problems with your code 1 in HTML: <head> goos before <body> 2 the <head> tag does not have a script atrbute [CODE] <head> <script type="javascript/text">[/CODE] 3 don't close the javascipt tag to insert php [CODE] var id1=document.getElementById(<?php print $id ?>);[/CODE] 4 ... well fix 1b to 3 … | |
Re: you got an error in your query that's why mysql_query retuns FALSE and not a MySQL result resource. [CODE]$sql = " SELECT * FROM pqdb_articles, pqdb_categories WHERE article_id = " . mysql_real_escape_string($article_id) . " $query_ext AND category_id = article_cat ";[/CODE] what is $query_ext ? | |
Re: do something like [CODE] $NameArray=$_POST['name']; foreach($NameArray as $Employee_Name) { [/CODE] | |
Re: That's because $delete doesn't exist. but you got bigger problems: you cant just use <input > , it must be inside a <form > [URL="http://www.w3schools.com/tags/tag_form.asp"]http://www.w3schools.com/tags/tag_form.asp[/URL] to link back to you script [CODE] <form action="<?php echo($_SERVER['PHP_SELF']); ?>" method="get"> [/CODE] your form values will be in $_GET change your if to [CODE] … | |
Re: You had an exstra ) on line 3 long live 'TAB' [CODE]<?php $res = mysql_query("SELECT * FROM users WHERE username = '$user' LIMIT 1"); if(mysql_num_rows($res)>0) { $d = mysql_fetch_array($res); if($pass == $d['password']) { session_regenerate_id(); //security for changing permissions $_SESSION['user_id'] = $d['user_id']; $_SESSION['usertype_id'] = $d['usertype_id']; switch($d['usertype_id']) { case 1: $loc = … | |
Re: you have your <input > inside a link this can be a problem see: [URL="http://www.quirksmode.org/js/events_order.html"]http://www.quirksmode.org/js/events_order.html[/URL] also if this.form.submit() fails you still go to the next page but without the form being send so remove the link. | |
Re: you will not get back a $_POST['form1'] you can see thi if you do a var_dump($ _POST); so [CODE]if(!isset($_POST['form1'])){ dropdown_empty();[/CODE] will not work. use [CODE] if (is_set($_POST['select']) $month = $_POST['select']; else dropdown_empty(); [/CODE] even better [CODE] if (is_set($_POST['select'] && !empty($_POST['select'])) $month = $_POST['select']; else dropdown_empty(); [/CODE] as it also checks … | |
Re: [CODE]$('#response').load('createtable.php'); [/CODE] this go's wrong if creatatble.php contains things like <html>, <title>, or <head> for creatatble.php use cereals code and noting else. | |
Re: Gess nthat you get a 'header already send' error That because headers have to be sende before any output and that includes javascript [CODE]if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } else header('Location: http://www.example.com/index.php'); [/CODE] Put the alert in the index.php (or use something better then an alert box) | |
Re: You can do some thing like that in mysql [CODE] SELECT count(), date(rowname,'unixepoch') as datum FROM tablename WHERE 1 GROUP BY datum [/CODE] | |
Re: make effery month 31 day's and than use [URL="http://www.php.net/manual/en/function.checkdate.php"]checkdate[/URL] on it | |
Re: trie [CODE] <div class="button_outside" id="share" onclick="javascript: document.forms["myform"].submit();"> <div class="button_inside">Share</div> </div> [/CODE] ![]() | |
Re: you are still not using backticks as ardav told you to ` is diverend than ' ` is on the same key as the ~ ( atleast on my keyboard) or you can copy and past ardav code | |
Re: try [CODE] var_dump($_POST); [/CODE] if they don't show up you got a problem with your form page | |
Re: take the declaration of the table outside of the while loop and use javascript to add new rows: see [URL="http://www.mredkj.com/tutorials/tableaddrow.html"]http://www.mredkj.com/tutorials/tableaddrow.html[/URL] | |
Re: you can have 1 form with multiple submit buttons | |
Re: is this what you mean? [CODE] <script type="text/javascript"> showmore() { document.getElementById('more').style.display=""; } </script> <div id="standard"> dropdownlist texbox etc <button name='more' onclick="showmore()"/> </div> <div id="more" style="display:none"> more stuff here </div> [/CODE] | |
Re: checked is simular as disabled so use [CODE]<td> <input name="power" type="checkbox" disabled="disabled" <?php if($row['power_backup']=='on') echo 'checked="checked"'; ?> /> </td>[/CODE] | |
Re: just a thought: do you have a 'headers already send' error with you error messages turned off? test by using by using a echo-statement at the start of your script | |
Re: i think it is: [CODE]mysql_query("SELECT a, b, (a+b) AS c FROM table HAVING c=1");[/CODE] | |
Re: check out [URL="http://www.php.net/manual/en/function.htmlentities.php"]htmlentities[/URL] | |
Re: use [CODE]$r['harga'][/CODE] and [CODE]$r['deskripsi'][/CODE] | |
Re: the correct way is [CODE]$_SESSION['username'][/CODE] | |
Re: If you can't send a picture inside the message as html. You can only send it's URL make sure the recverer does't get something like c:\local_user\my pictures\foto.jpg | |
Re: does your script run in your rootdir: mywebsite or in a subdir : mywebsite/phpfiles/ | |
Re: Where do $message_id and $username get there value ? if not in db_connect.php then they don't exist | |
Re: $cnt is set inside an if-statment: [CODE]if (isset($_GET['actiune']) && ($_GET['actiune'] == "adauga")) {[/CODE] so if this is false $cnt don't exist | |
Re: use [CODE] $query="Select UserId, UserName, Password FROM user_login Where UserName= '".$_POST['username']."' and Password= '".$_POST['password']."'"; echo $query; $sql=mysql_query($query) or die(mysql_error());[/CODE] at least you get some more info | |
Re: You never close this block [CODE]if (isset( $_POST['payrec']) ) {[/CODE] | |
Re: what are u try to do with [CODE] <?=$row['song']?> [/CODE] if u wan to display $row['song'] [CODE] <? echo $row['song']; ?>[/CODE] your code will look like [CODE] <form id="adminsform" name="adminsform" method="post" action=""> <input type="checkbox" name="master" onClick="checkedAll('adminsform')" value=""/> <?php while($row=mysql_fetch_array($result)) { ?> <input type="checkbox" name="musicid[]" value="<?php echo $row['id']; ?>" /> <?php … | |
Re: on this site you can try them out yourself: [URL="http://php.opensourcecms.com/"]http://php.opensourcecms.com/[/URL] ![]() | |
![]() | Re: In your first script where is the array [CODE] $row['path'];[/CODE] (line 6) come from? ![]() |
Re: i see 3 solutions 1 fopen each file and readout the <title> atrebute -This probley makes your script to slow to be use full 2 put the tilte and the filenames in an array and - if you want to add a new file u also have to edit your … | |
Re: cookies need to be send before any other output check for white space Before <?php tag also could try [CODE] if(isset($_COOKIE['logedin'])) { header("Location: http://www.example.com/"); } else [/CODE] cant test myself now so no guarantees | |
Re: take your declaration of function number_of_days outside your while loop best is top of the script | |
Re: If i understand corectly: You have something like a form (no listing) that sends data to a page (listing 1) that sends the data to /i-cmsys/editableinvoice/index.php (listing 2) if so: Data send in th url is GET data use [CODE]echo $_GET['edit_mileage'];[/CODE] | |
![]() | |
![]() | Re: You use [CODE]mysql_free_result($result)[/CODE] as part of your loop so the second time in the while loop $result is empty ![]() |
Re: standard php function [URL="http://nl3.php.net/manual/en/function.substr-count.php"]substr-count[/URL] | |
Re: just start, if you have problems just google or 'daniweb' | |
Re: not sure wat you want but i gess just build the sub radio buttons use display:none then create an actionscript to set display:block | |
![]() | Re: In your form use [CODE]<input type="hidden" name="MAX_FILE_SIZE" value="102400" /> <input type="file" ....... [/CODE] this pervents uploads of bigger files on the client side still need to check the size at the server side [URL="http://se2.php.net/manual/en/features.file-upload.post-method.php"]see php site[/URL] |
Re: did you do [CODE]var_dump($_POST);[/CODE] to check what you got back? if not checked a checkbox will give a $_POST var. check if it exist [CODE]if(isset($_POST['Proof']))[/CODE] furthere more before puting $_post in a db ALWAYS use mysql_real_escape_string() to prevend hacking this gives [CODE] if(isset($_POST['Proof'])) { $Proof = mysql_real_escape_string($_POST['Proof']) } [/CODE] | |
Re: ALLWAYS use [URL="http://php.net/manual/en/function.mysql-real-escape-string.php"]mysql_real_escape_string()[/URL] or you will be hacked read [URL="http://www.php.net/manual/en/security.database.sql-injection.php"]http://www.php.net/manual/en/security.database.sql-injection.php[/URL] [CODE] mysql_select_db("mlsconnection_99k_dbusers", $con); $sql="INSERT INTO Persons (FirstName, LastName, Email, Password) VALUES (".mysql_real_escape_string($_POST[firstname])."','".mysql_real_escape_string($_POST[lastname])."','".mysql_real_escape_string($_POST[Email])."','".mysql_real_escape_string($_POST[Password])."')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "User created, Thanks for Registrating"; mysql_close($con) [/CODE] | |
Re: using [CODE]session_id()[/CODE] will create a cooky some pc might have cooky's disabeled. p.s please use the code tages for readebilty | |
Re: i recenty had a simular probem see [URL="http://www.daniweb.com/forums/thread328163.html"]http://www.daniweb.com/forums/thread328163.html[/URL] ![]() | |
Re: I 'm always suspicious about filenames with spaces [CODE] $fileName=str_replace(" ","_",$fileName); [/CODE] | |
Re: Youre query doesn't give a good result use at line 12 [CODE]$query2 = mysql_query($sql2) or die(mysql_error());[/CODE] to get more details |
The End.