812 Posted Topics

Member Avatar for AntonyRayan

Split on what condition? Give an example of a session variable you have and how would you like to have it split.

Member Avatar for diafol
0
173
Member Avatar for janicemurby

You use `to` as the field name but `to` is also a mysql reserved word. So if you realy want to use it for a field name, enclose it in backticks like this: ..., `to` = "' .$to. ... Better practice is to completely avoid using keywords for field names. …

Member Avatar for diafol
0
289
Member Avatar for Emma_4

Just give the `title` attribute a correct value to display the description. In your case line 7 would be: echo '<div class="imageObject"><img src="ressources/images/objects/', $P_Element, '.jpg" width="150" height="150" hspace=0 vspace=0 title="', $T_Description, '"/></div>'; provided that the `$T_Description` variable contains the actual description.

Member Avatar for lps
0
170
Member Avatar for tibor.marias

Depends on how you display the icon. One way of doing it is using a CSS background property: div.ofsomeclass { background-color: #FFFFFF background-image: url("some/location/marker-green.png"); background-repeat: no-repeat; background-position: letf top; } Now define the hover pseudo class: div.ofsomeclass:hover { background-image: url("some/location/marker-blue.png"); } Should work OK in modern browsers (not IE6/IE7). There …

Member Avatar for jkon
0
256
Member Avatar for Gideon_1

In my opinion and experience the answer is yes. I know of one organization that uses xampp on a windows server for an intranet app that serves say a hundred users and they are all happy about that. You have to be aware of a possible decreased performance with large …

Member Avatar for broj1
0
1K
Member Avatar for blueguy777

Insert this simple debug code after line 115: die($q); It will display the query as it has been constructed and stop the script. Now you can inspect the query and paste it into phpmyadmin to check it if it works. You can post it here also. You took the complex …

Member Avatar for lps
0
238
Member Avatar for adishardis

Just to clarify - the string can actualy be one of the values below: $stringExample = '((823584X80X998.NAOK == "1"))'; $stringExample = '((823584X80X1001.NAOK == "1" or 823584X80X1001.NAOK == "2" or 823584X80X1001.NAOK == "3"))'; If that is true, you have to: - get rid of all the parentheses - explode by `OR` …

Member Avatar for adishardis
0
2K
Member Avatar for Niloofar24

You can get some user agent strings [here](http://user-agents.my-addr.com/user_agent_request/user_agent_examples-and-user_agent_types.php).

Member Avatar for Niloofar24
0
5K
Member Avatar for reminem

The if statement has an error. Instead of assignment operator `=` you should use comparison operator `==`, like: if ($row['question_type'] == 1) In the form html code you are missing some quotes (altough this should not be critical): echo '<td>'. '<input type="'.$type.'" value= "'.$row['question'] . '" </td>';

Member Avatar for reminem
0
270
Member Avatar for SoMa_2

Enclose each row (and ID and a delete button) within form tags and add a hidden input that holds the value. You will have as many forms as there rows. When you delete (submit), the value in the hidden input field will get over to the next script. And you …

Member Avatar for broj1
0
382
Member Avatar for ramsiva

Have you tried a full path, like: $pdf->Image('a.jpg',20,65,20,0,'','http://yoursite.com/yourpath/searchstudentavailability.php');

Member Avatar for broj1
0
231
Member Avatar for Kristiano

Sort result rows by timestamp. See comments in the code for the rest: // initialize current timestamp to 0; $currentTimestamp = 0; // initialize current array that will hold the result $resultArr = array(); // loop through the result // (this example is for PDO, change to whatever driver you …

Member Avatar for diafol
0
2K
Member Avatar for anandatheerthan

The select elements have to have name attributes and be enclosed in form tags containing the action and method attributes in order to properly pass the values to the server. Something like: <form action="process.php" method="post"> <select class="pais" name="sel_pais"> <option value="1">Argentina</option> <option value="2">Chile</option> </select> <select class="provincia" name="sel_provincia> <option value="1" class="1">San Juan</option> …

Member Avatar for phpcake
1
4K
Member Avatar for charliehustle88

Where do you initialize the `$HTML` variable so you can concatenate to it? // initialize $HTML $HTML = ''; foreach($records as $row) { $HTML.='<div>'; $HTML.= $row['State']; $HTML.='</div><br/>'; } Also the `PDO::PARAM_INT` value in the binding part should be `PDO::PARAM_STR`, since you are actually binding a string type. $query = "SELECT …

Member Avatar for broj1
0
398
Member Avatar for Trabelsi

First: do not use GET for the form method, use POST. When using GET, passwords will be visible in the URL bar of the browser and will get written in the browser cache and history. This way anyone with basically no web dev skills will be able to see usernames …

Member Avatar for Trabelsi
0
325
Member Avatar for bolfescu

Did my answer from [your other thread](https://www.daniweb.com/web-development/php/threads/494085/php-excell-img) not help you? I have provided a tested working example there.

Member Avatar for broj1
0
691
Member Avatar for Niloofar24

Depending on how your overall approach is to processing form data, but in general it is as easy as: if(empty(trim($_POST["Title"])) || empty(trim($_POST["Author"])) || empty(trim($_POST["Content"]))) { echo "You forgot to enter some required data"; // go back to the form } else { // // I HOPE YOU DO SOME FILTERING …

Member Avatar for Niloofar24
0
492
Member Avatar for madmax9922

You could make it simpler by using `file_exists` instead of using all the `scandir` stuff: $p = $_GET['p']; // WARNING: sanitize this before using it in production app if (file_exists($dir.'/'.$p.'.htm')){ include($dir.'/'.$p.'.htm'); } else { echo 'Sorry, page introuvable'; } And sanitize user input (such as limiting it to certain path, …

Member Avatar for broj1
0
2K
Member Avatar for jay.barnes

This code: public function get_validator(){ return $this->response_code; return $this->response_msg; } should be probably broken into two methods: public function get_response_code() { return $this->response_code; } public function get_response_msg() { return $this->response_msg; } I have been using OOP approach for several years now, and must say that it helps a lot. I …

Member Avatar for jay.barnes
0
420
Member Avatar for rouse

I copied the files form the attached zip and everything works fine. Json gets displayed in the `jsonReadArea` div. Have you checked all permissions are OK?

Member Avatar for rouse
0
578
Member Avatar for Prince_9

Must be an issue with quotes. Try something like this: curl -i -H "Accept: application/json" -d '{"username": "divmesselibrary", "password": "677Sure1@"}' or: curl -i -H "Accept: application/json" -d "{\"username\": \"divmesselibrary\", \"password\": \"677Sure1@\"}"

Member Avatar for broj1
0
336
Member Avatar for James_43

The $result does not contain the rows from the database yet. It is just a special PHP type variable that enables fetching of rows. So you have to fetch rows, usually in a loop: The following is an example using [mysqli](http://php.net/manual/en/intro.mysqli.php) object oriented way: $username = "USERNAME"; $password = "PASSWORD"; …

Member Avatar for jj.dcruz
0
303
Member Avatar for kajuu

Post the code you have so far and describe where exactly the problem is. Also, please read [this](https://www.daniweb.com/web-development/php/threads/435023/read-this-before-posting-a-question).

Member Avatar for broj1
0
39
Member Avatar for bolfescu

You might want to try the HYPERLINK() formula. Haven't tested this, just looked up some info on the net. See also [this link](http://www.devshed.com/c/a/PHP/PHP-Excel-Customizations-Working-with-Formulas-and-Functions/).

Member Avatar for broj1
0
387
Member Avatar for SimonIoa

Is the code <a class="showallphoto" href="'.$base_url.'login.php?showallphoto=' . $messageid . '" style="cursor:pointer"> echoed by a PHP script? If yes, show the whole line. Also test if the link gets constructed OK (by inspecting the generated code, by hovering with the mouse over it and checking the status line etc).

Member Avatar for SimonIoa
0
493
Member Avatar for afaye

The error message is saying that the value of `$row['callback_function']` is an array and can not be cast to string. In order ot find out what the value is when the error occurs you have to do some simple debugging (if you are not using a proper debugger). Put this …

Member Avatar for broj1
0
267
Member Avatar for sandeep.tete

You can store the value in a hidden input field in the form which will then be picked up when form is submitted. <input type="hidden" id="hidden-date" /> And in the javascript I guess you change line 21 to: document.getElementById('hidden-date').value = document.getElementById('time').innerHTML;

Member Avatar for JorgeM
0
6K
Member Avatar for MarkDbro

The error is in the paramaters of the `mysql_query` function. The first parameter should be the query (string type), and the second (optional) parameter is the link (of type resource type). You have wrong sequence ot these parameters. And the mantra: ditch the deprecated `mysql_*` functions and replace them with …

Member Avatar for Szabi Zsoldos
0
999
Member Avatar for janicemurby

It seems that the `$topuid` variable is not an array (the implde function expects an array). Can you check it out? You can put this code just before line 3 in the above code: die(print_r($topuid, 1)); This will display the value of the variable and stop the script. Please post …

Member Avatar for janicemurby
0
361
Member Avatar for bolfescu

You have to debug ajax calls which is easier with tools like Firebug. But anyway, I think you should check the UPDATE query from the `updateMemberAjx()` function. You can try to display the query instead of the success message by assigning the query to a variable in each case statement …

Member Avatar for bolfescu
0
218
Member Avatar for phoenix254

And what is the actual problem? Describe where you got stuck and post possible error messages.

Member Avatar for phoenix254
0
534
Member Avatar for uchejava

The problem might be occuring at the time of saving pictures in the database (there are two photos in the folder but only one in the database). Post the code for saving the data into the database (I have a feeling that the insert query should be within the for …

Member Avatar for amith_ami
0
206
Member Avatar for Prince_9

The values you are trying to display have no values so you see nothing. To prove that add some static texts to the echo statement, like this: foreach ($array as $values) { echo 'AUTHOR FL: ' . $author_fl = $values['show']['showCovers']; echo 'BOOK_ID: ' . $book_id = $values['books']; echo 'TITLE: ' …

Member Avatar for broj1
0
357
Member Avatar for chaitu11

You can store number of images per row in an array (this is untested, just a concept): // between lines 17 and 18 - initialize variables $rowNo = 1; $imagePerRow = array(); // between lines 44 and 45 - assign current value for that row imagePerRow[$rowNo] = $x; // on …

Member Avatar for matrixdevuk
0
204
Member Avatar for anmol.raghuvanshi1

On line 14 you are calling the `Voucher` method which expects two parameters: the object of the `Registry` class (first parameter) and the voucher code (second parameter). You supplied only one parameter, which should be the second one. Hence it is of wrong type. Supply both parameters (and both of …

Member Avatar for matrixdevuk
0
345
Member Avatar for chaitu11

Your text contains an apostrophe (`'`) which is also used in mysql as a string delimiter. In order to store an apostrophe into the DB you have to escape it usually using a database escape function (mysql_real_escape_string in your example): $insert = mysql_query("insert into offer( descr ) values( '".mysql_real_escape_string($descrr)."' )") …

Member Avatar for chaitu11
0
1K
Member Avatar for anmol.raghuvanshi1

You are mixing `mysql_*` and `mysqli_*` functions as well as object oriented and procedural style. The code below is `mysqli_*` OOP style, and is not tested, just to give you an idea. See the comments. // check if form submitted and if code field is not empty if(isset($_POST['submit']) && $_POST['code'] …

Member Avatar for broj1
0
317
Member Avatar for Geekmonir

I presume $user is the object instatntiated from the class that contains the selectData method. I am guessing that this class stores the results (array, object...) into some properties. Now, you should use correct operators to address those properties, such as: echo $user->aarrayResultProperty['P_id']; ... And also: $QUERY->Fetch_Assoc; I do not …

Member Avatar for broj1
0
198
Member Avatar for mattyd

Te index file should have a php extension only if you have some PHP code in it. Also your web server should have all the neccessary modules instaled and enabled. Which web server are you using?

Member Avatar for broj1
0
249
Member Avatar for Stefce

Your for loop gets repeated only two times. Did you mean you want to display an ad every 10th match?

Member Avatar for Stefce
0
236
Member Avatar for Geekmonir

Please post the whole class structure not only one method. $Fetch_Assoc, $Fetch_Array, $Num_Rows and $Fetch_Object should be either assigned to some properties or somehow returned by the function. There is a third option which is that these variables were made global but that would defeat the purpose of OOP. An …

Member Avatar for broj1
0
179
Member Avatar for F-3000

Writing into a text file could be problematic if you have more than one concurent writing attempt (e.g. two users trigger an error at the same time). With database logging the DB server takes care of queing writes. Also the contents of text files tends to be more clumsy to …

Member Avatar for Joel100
0
273
Member Avatar for UK-1991

In my view the concept you used is OK. I am assuming the form and the PHP code are in the same script. So user can fill in the form to find data from previous months or just leave it blank and get data for the current month. There are …

Member Avatar for UK-1991
0
460
Member Avatar for bubbafunk1

Does the `is_category(10)` function return true? Test it this way: if(is_category(10)) { echo do_shortcode('[smartslider2 slider="14"]'); } else { echo "Error detecting the category page"; } Now, if it returns the above error message post the `is_category()` function code.

Member Avatar for bubbafunk1
0
211
Member Avatar for radu.campian

You are almost there. Just remove quotes arround the row elements, add quotes arround row element names, add semicolon at the end and use `<?php` start tags: <?php echo $row['den_material'];?> You might also want to check for errors: if($result = mysql_query($order)) { // do the stuff... ... } else { …

Member Avatar for broj1
0
211
Member Avatar for AntonyRayan

You will have to use Javascript for this. The `confirm` dialog box will be the one to use. See: http://www.tizag.com/javascriptT/javascriptconfirm.php. https://www.daniweb.com/web-development/php/threads/34967/how-can-i-make-php-alert-pop-ups-just-like-in-javascript-

Member Avatar for AntonyRayan
0
4K
Member Avatar for PinoyDev

You can check your server side sript if it works OK. Try to input the URL with the parameters into your browser directly e.g.: php-includes/news_letter_send.php?name=somename&[email protected] You will have to change the global array to $_GET temporarily: if(isset($_GET['name']) && isset($_GET['email_address'])) { $name = $_GET['name']; $email = $_GET['email_address']; ... } else { …

Member Avatar for PinoyDev
0
205
Member Avatar for emaus9

Your message/notice/title says: Undefined index in php file, but you posted only HTML code, no PHP code. Please post the relevant PHP script that triggered the error (probably the formdata.php, but only you can know).

Member Avatar for broj1
0
343
Member Avatar for andrew3208

This could be quite a complex task and I think you would need some server side scripting (such as [PHP](http://php.org/)) and a database (like [mysql](http://www.mysql.com/products/community/)). You would also have to look at the PHP forum here but I guess you might get some experience or get someone with PHP and …

Member Avatar for broj1
0
129
Member Avatar for Stefce

It is much easier to check the query if you do not use all the concatenation. You can do it this way: $sql = "INSERT INTO `kladilnica` VALUES ('', '$getUsername', '$betAmouth', '$gain', '$date', '$match1', '$match2', '$match3', '$match4', '$match5','$match6', '$match7', '$match8', '$match9', '$match10', '$match11', '$match12', '$match13', '$match14', '$match15', '$match16', '$odd')"; You …

Member Avatar for broj1
0
221

The End.