194 Posted Topics
Re: i forget which version of mac os it is where users that are created dont have passwords stored in the normal password field and doesnt pass the password out through open ldap to test dump your ldap resulet set and check if theres a password field in it if there … | |
Re: should be `and department in ($dep)` or much simpler select[fields] from t1 inner join t2 on t1.id = t2.t1id where t1.id = id | |
Re: are you sure your db connection is working try adding some debugging > if(!mysql_select_db($db,$con)) > { > header('Location: login.php?selectDB=failed'); > } | |
Re: password is mysql reserved word in order to tell mysql that you are using it as a field name you need to encase it in backticks `password` ![]() | |
Re: Im sure someone will scream at me for this but im a fan of using OB so for example <?php $message = $_POST["your_var"]; ob_start(); ?> <html><head> <title>HTML Email</title> </head><body> <?php print $message; ?> </body></html> <?php $email = ob_get_contents(); ob_end_clean(); // To send HTML mail, the Content-type header must be set … | |
Re: date is reserved word you shouldn't use it as a field name you can still get around this by wrapping date in backticks `date`='$date' ![]() | |
Re: How large a result set are you likely to end up with? It might be a better idea to store your data in a cookie or session instead of writing out and then parsing long strings try using serialize and unserialize to pass your array around create array from db … | |
Re: instead of just doing a plain insert > insert into certificate values(null,'$admission_no','$report','$date') use an insert select `INSERT INTO certificate (admission_no, report, date) SELECT '$admission_no','$report','$date' FROM certificate WHERE //check whatever values you dont want repeated ie admission_no HAVING (count(*) = 0) ` also you might want to look into sql injection … | |
Re: you need to lookup the info in your db `select info from table blah blah` then print the value in each form element `value="<?php print $myValue;?>"` | |
Some browsers will resort a json array by index to make access faster, I understand this. The problem is that when I pass my json object to jeditable using the data setting, in those browsers my options dont come out in the order I need them (Alphabetic). PHP creating the … | |
Re: > <a href=\"$_SERVER[PHP_SELF]?action=update\" onclick=\"return confirm('Are you sure?');\">Update Cart</a> your not posting your form you need to use a button or js to submit your form @pritaeas name is fine it has the same effect | |
Re: try datatables | |
Re: your getting a js error because your link syntax is wrong > onclick="location.href = <?php echo $linkback; ?> you need single quotes around the link and your missing the closing double quotes after onclick `onclick="location.href = '<?php echo $linkback; ?>'"` and the `submit` part of the button is firing causing … | |
Re: just post your whole form to the php page (add a submit button to your form and add `method="post"` to your form tag) and then get the values from `$_POST` | |
Re: from experience id recommened not storing the files in the db store the url and just save th image to a predefined directory that said to store files in a db you need to upload file open the file read the contents then save th contents to a blob type … | |
Re: google tcpdf output your reports as pdf's - then let users do what they want with them. email save whatever | |
Re: is $dataArray an array also? if not just [ICODE]echo $dataArray;[/ICODE] or if it is an array try [ICODE]echo $dataArray[0];[/ICODE] | |
Re: add an onclick to your buttons [ICODE]onclick="return this.form.action='path/to/page'"[/ICODE]and skip the in between page then just post variable to the page you need them on of course using array names in your forms is always easier for passing lots of variables | |
Re: one query ordered by year/month [CODE] year = ''; foreach row if row[year] != year print year end if do stuff end loop [/CODE] | |
Re: are you sure your your action is set right? does insert.php exist and is it in the same folder | |
Re: whats rbox probably you want $('#rbox').html(content); | |
Re: [CODE]<select id="select" onchange="doThis()"> <option value="easy">Easy</option> <option value="medium">Medium</option> <option value="hard">Hard</option> </select>[/CODE] though I'm not sure what doThis is doing | |
Re: [QUOTE=webblar;1758171] I've got a users table with id, name, username, password, date. A group table with group_id, user_id, group_name, module_code, description. And a students table with student_id, group_id, user_id, fullname, student_number, email. [/QUOTE] might be worth planning for each student to be allowed in multiple groups something like student: student_id … | |
Re: shouldn't it be something like [ICODE]echo $row->value;[/ICODE] try also [CODE]while($row = mysql_fetch_assoc($result)){ echo $row["name"]; //would return game based on your dump }[/CODE] | |
Re: if you're replacing department display the current(selected) value in a text box and let users select a new department from the drop down | |
Re: try [ICODE]parseInt(xmlDoc.getElementsByTagName("x")[0].childNodes[0].nodeValue);[/ICODE] one be a string containing a number, one be a number | |
Re: is_ajax is not being sent from your form so $_REQUEST['is_ajax'] is undefined where is $_REQUEST['is_ajax'] coming from also to prevent errors like that [CODE] $is_ajax = $_REQUEST['is_ajax']; if(isset($is_ajax) && $is_ajax) { [/CODE]should be [CODE] if(isset($_REQUEST['is_ajax']) && $_REQUEST['is_ajax']) { $is_ajax = $_REQUEST['is_ajax']; [/CODE] | |
Re: [QUOTE]I have the searches doing the job except when I move from one search to the other the first search is cleared from the form.[/QUOTE] i assume you are looking to search where info(some detail) = search 1 and search 2 that being the case you need to pass the … | |
Re: to repeat what ardav said either allow users to register as a basic user and have a current administrator promote them after they've registered or somewhat lacking in security have a common code that teachers or administrators can use when they register to identify them as power users if you … | |
Re: vertical align will only work with table cells that being said you can set [ICODE]display: table-cell;[/ICODE]on your links | |
Re: most likely it is calling check but as your button type is submit its redirecting you probably back to the same page making it appear nothing happened try changing button type to button or adding [ICODE]onclick="return check()"[/ICODE] with a return false if you are not trying to redirect or true … | |
Re: [CODE] $holdDate = strtotime($request_r[3]); if(strtotime('+ 30 minute', $holdDate) < time()){ dostuff; } [/CODE] | |
Re: you need to add [ICODE] event.preventDefault();[/ICODE] to your onclick function to prevent your page from being redirected by the link you are clicking on leaving out the href from the tag or having an empty href just tells the page to redirect to its self [CODE] $("a").click(function(event){ event.preventDefault(); $.get( "search.php", … | |
Re: some thing like this maybe [CODE] select zen.ID, Bestemming, Datum, sum(Aantal_Duiven*Aantal_Manden) as total_birds from Zendigen zen inner join Shipments ship on ship.Zending_ID = zen.ID inner join Manden man on ship.Mand_ID = man.ID where Actief = 1 group by(zen.ID) order by Datum [/CODE] | |
Re: try replacing [CODE]$data = mysql_query("SELECT ID FROM users WHERE username = '{$this->_username}' AND password = '{$this->_passmd5}'");[/CODE] with [CODE]$data = mysql_query("SELECT ID FROM users WHERE username = '$this->_username' AND password = '$this->_passmd5'");[/CODE] or [CODE]$data = mysql_query("SELECT ID FROM users WHERE username = '".$this->_username."' AND password = '".$this->_passmd5."'");[/CODE] | |
I hate websites that timeout and don't let you know about it this script pops up a message when you timeout and allows you to re-login in place | |
Re: when using brackets "sizes[]" in input name php gets the variable as an array [CODE]$query = "UPDATE style SET sizes = '$sizes' WHERE id = '$i'";[/CODE] you need to loop through the array of sizes and build your "size" string [CODE] $sizeString = ''; foreach($sizes as $size) { $sizeString .= … | |
Re: replace [CODE]if(($this->$password !== $this->$confirm_password)) $this->errors[] = 'Passwords Must Match'; if(($this->$username == $this->$password)) $this->errors[] = 'Password Cannot Be Your Username';[/CODE] with [CODE]if(($this->password !== $this->confirm_password)) $this->errors[] = 'Passwords Must Match'; if(($this->username == $this->password)) $this->errors[] = 'Password Cannot Be Your Username';[/CODE] | |
Re: [CODE] $xxx = explode("\r\n", $text); foreach($xxx as $line) { echo $line; } [/CODE] | |
Re: The slashes are generated when you submit your editor content with ajax before saving to your database make sure to use a function like (php stripslashes) | |
[CODE] <script type="text/javascript"> //<![CDATA[ function cbUpdate() { var opt; var sel = document.info.cbShow; sel.style["display"] = "block"; sel.length = 0; opt = document.createElement( "option" ); opt.setAttribute("value", "0"); optTxt = document.createTextNode(document.info.cbSelected.value); opt.appendChild(optTxt); sel.appendChild(opt); for(i = 0; i < document.info.cbHold.length; i++)//or use ajax { if ((document.info.cbHold[i].text).indexOf(document.info.cbSelected.value) != -1) { opt = document.createElement( "option" … |
The End.