198 Posted Topics
Re: Are you running this on a Windows Server? | |
Re: As soon as you send any HTML or echo anything to the DOM you can no longer do a header re-direct or you will get this error. header( 'Location: admin.php' ) ; Cannot go where you placed it. On a security side not, I would never use $_REQUEST, use the … ![]() | |
Re: If you're appending the element to the form it should be available on your POST without any further action. How are you adding the additional element? | |
Re: No one is going to write this for you, if you need help with specific code than we can help. There is a lot of free knock off versions written in jQuery and JavaScript. You won't find a pure PHP Chat | |
Re: I think I understand what you're trying to do. $raw_text = trim($file['description']); if(strlen($raw_text)>200) { $raw_text = substr($raw_text, 0, 200) . "..."; } $final_text = str_replace('*', $file['field2'], $raw_text); echo "<p>$final_text</p>"; | |
Re: You're missing the = in your password field name property. You have: <input type ="password" name'p' /> Should be: <input type ="password" name='p' /> | |
Re: Based on this code you can have several different ID's but only one upload form. How is the user picking which veh they are upload the photos for? You just need to add a hidden form field to your form once you know `<input type="hidden" name="veh_id" value="<?= echo $row['id']; ?>" … | |
Re: You want to show a different image depending on which item is selected from the drop down list? Do I understand you correctly? | |
Re: Should just need to remove the echo "</table>"; from within your while loop, put it just fater your closing bracket as urtrivedi suggested. What's happening now if you view sorce you'll see that at the end of each row there will be an </table> and no new table started. | |
Re: scandir returns an array of all files and directories. You'll need to verify the file is a file and not a directory as it stands right now you're trying to file_get_contents on directories which will fail. | |
Re: Check your error logs, there is an error in your PHP which will cause the page to appear blank. It can be a lot of adifferent things so best to refer to your error log to see what it says. | |
Re: I answered this question for you in you're other topic should do what you're looking for | |
Re: Your form has name="email" but script has $_POST['Email'] make sure both have the same capatalization. Change your regex expression for strings to: `#[^a-z .'-]#i` And for numbers: `#[^0-9]#` ![]() | |
![]() | Re: Because you have defined a constructor for the child class the parent constructor is not implicitly called. When you define a constructor you must construct the parent to make the functions available to it: function __construct($coworker_name) { parent::__construct(); $this->set_name($coworker_name); } ![]() |
Re: With whats given I don't know what your initial object variable is (what your var_dump'd) so I'll just use $objVar for demonstration purposes. Easiest way is to work backwards from what you want. So for example the id. We see it's keyed as id so we write that down. Step … | |
Re: Is this code tossing an error? Security issues aside, nothing is jumping out at me as being wrong ![]() | |
Re: `$query = $this->db->where('id',$id);` That's actually correct, it's part of the Active Record driver for the DB. The $id variable is loaded from the URI websitename.com/folder(optional)/class/function/variables So if you were to goto for example websitename.com/entries_model/get_comment/12/ CI would basically interpurate that as load the Entrie_model class, run the get_comment function and pass … | |
Re: The easiest way is can hide all than re-display the one you want: function handleSelection(choice) { document.getElementsByClassName('hide').style.display="none"; document.getElementById('select').disabled=false; document.getElementById(choice).style.display="block"; } | |
Re: When using jQuery, the $('#game') selector selects ALL elements with the game ID and does not give you the actual DOM element to allow you to do this. jQuery exposes the actual DOM elements by numeric index to allow regular DOM/Javascript functions: `var canvasElm = $('#game')[0];` | |
Re: This is why we don't copy and paste something from W3C lol... There is a lot of security issues with what you've posted. you should never take user inputted data and insert it directly into the database without verifying it first and you shouldn't store unencrypted passwords in your database. … | |
Re: Try this: $city_query = mysql_query(" SQL Query fetching all cities within 20 miles of current location "); while($current_city = mysql_fetch_assoc($city_query)) { $user_query = mysql_query("SELECT * FROM users_table WHERE city='" . $current_city['city'] ."'"); while($current_user = mysql_fetch_assoc($user_query)) { //you can do what ever you want to do with the users you get … | |
Re: When the form loads the input boxes have 'ENTER USERNAME' and 'ENTER YOUR PASSWORD' in them as values. The onclick event is just clearing those values so when the user clicks on the input box it empties the box so the user can type their username and password. The issue … | |
Re: Are you sure the catagory is being set properly? What do you get if you var_dump($cat); or echo $query; ? | |
Re: No such thing as font-style: bold; should be font-weight:bold Line 26 of your first HTML file you have an extra " in the image tag | |
Re: Did you follow the information the other two posters gave you? Your $_POST array keys need to have the same capatalization as the form $_POST['Name'] $_POST['Email'] $_POST['Message'] Without that it will not work. | |
Re: You're if statement needs to be within the while loop. You can't assign the values to qtyleft and name until you have fetched the row, and you need the array name before the key value: <?php include ('config.php'); ?> <?php $result=mysql_query("select * from inventory"); $num=mysql_num_rows($result); while ($row=mysql_fetch_array($result, MYSQL_ASSOC)) { $qtyleft=$row['qtyleft']; … | |
Re: It's very bad practice to put all your HTML and JS into PHP echo's. It's fine for a couple tags, but if you're going to be putting a lot of code it's better to close the PHP tag and re-open it again if you need it. That being said, you … | |
Re: Just off the top of my head you could not allow any . in the file name, take the file name and explode it at all . which should give you an array of 2, of it's more than they have extra periods so deny the upload i.e.: $file_array = … | |
Re: Wow thread resurrection, the OP hasn't been here in over a year | |
Re: You'll have to use AJAX. If you are using jQuery the .post() or .ajax() functions will do this: http://api.jquery.com/jQuery.post/ | |
Re: Just taking a quick peek, you're using the HTML 5 Enabler for IE which searches the body of the document for HTML 5 tags. You never actually end the page header and start the body so the script has nothing to search hence why it won't convert your HTML 5 … | |
Re: your return and line feed characters have double slashes which causes them to be ignored should be \r\n | |
Re: You have to put your <select></select tags outside the foreach loop or it will start a new select box for each: <select name="model" id="model" class="searchselectbox" onClick="toggleVisibility('pricelabel'); toggleVisibility('price');" onchange="this.form.submit();"> <?php foreach($recordset as $record){ ?> <option value="<?php echo $record['type'];?>"><?php echo $record['type'];?></option> <?php } ?> </select> | |
Re: Disregard.... just DaniWeb changing the post above on me so it's already been done | |
Re: PHP is processed by the server and JS as processed by the browser. By the time your javascript loop runs PHP has already been fully processed and you cannot modify PHP variables from within JS, you'll have to either do it entirely in JS or PHP not a combination of … ![]() | |
Re: If you surround your select box in a DIV with a fixed height and set the overflow if the drop down becomes too large it will toss in a scroll bar: <div style="height:60px;overflow:auto;"> <select> <option>...</option> </select> </div> I believe that answers your question | |
![]() | Re: alert(data[0].Title); |
Re: I told you in your previous topic the Same Origin Policy would prevent you from stealing content from someone else's website. Unless you have permission to use their catalogue and they've setup a JSON request for you it will not work. | |
Re: What you're referring to is called pagination. If you google php pagination tutorials you'll find plenty. | |
Re: Your action.php opening PHP tag is </php rather than <?php | |
| |
Re: You'll have to goto the php.ini file on your server. If you're running PHP 5.3.9 or later on your server you will have a line in your ini file that states max_input_vars = 1000 you can change the number there. If you're running an older version of PHP that value … | |
Re: You can load page fragments using jQuery's .load function, however based on what you've stated it sounds like you're trying to steal a section from someone else's website so due to the Same Origin Policy, the short answer is no. | |
Re: If it needs to execute PHP Code than you will have to use the .load() as the server needs to process the PHP. What is it you're trying to accomplish? | |
Re: It decodes to binary data, so without converting it into binary and potentially unleashing a virus onto your PC I suggest you leave it be and address your security issues and make sure you check your .htaccess files | |
Re: Your opening <form> tag should be before your first select box to group all your form options into the same form. Then when you click the search button it will submit all their selections to your search_results.php page | |
![]() | Re: Just taking a quick look at it I see these: Line 21 of custom_js [CODE]$(#reg_span).html("loading");[/CODE] Missing the " " in your selector [CODE]$("#reg_span").html("loading");[/CODE] Line 24 [CODE]$(#registration input, #registration button").each(function(){[/CODE] Missing the opening " in the selector [CODE]$("#registration input, #registration button").each(function(){[/CODE] Is the script tossing any JS errors? ![]() |
Re: Usually that happens when MySQL returns an empty record set and you try to minipulate it. Place your mysql_num_rows() function into the if statement before it or add an or die to your mysql_query [CODE=PHP] $result = mysql_query ($sql); if ($result) { if(mysql_num_rows($result)==0) { echo "ERROR - No mactching rows … | |
Re: Are you including the dollar sign ($) in your price? If so make sure you escape it \$ or ASCII it |
The End.