198 Posted Topics

Member Avatar for webdev2012
Member Avatar for GlenRogers

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 …

Member Avatar for diafol
0
341
Member Avatar for hakeemtunde

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?

Member Avatar for hakeemtunde
0
101
Member Avatar for Vijaysurya

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

Member Avatar for paulinetaylor85
0
191
Member Avatar for mpc123

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>";

Member Avatar for mpc123
0
196
Member Avatar for hwoarang69

You're missing the = in your password field name property. You have: <input type ="password" name'p' /> Should be: <input type ="password" name='p' />

Member Avatar for hwoarang69
0
90
Member Avatar for GraficRegret

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']; ?>" …

Member Avatar for GraficRegret
0
455
Member Avatar for joeyliew7

You want to show a different image depending on which item is selected from the drop down list? Do I understand you correctly?

Member Avatar for joeyliew7
0
2K
Member Avatar for AndreRet

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.

Member Avatar for AndreRet
1
196
Member Avatar for DEAD TERMINATOR

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.

Member Avatar for coreyavis
0
261
Member Avatar for matusekm

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.

Member Avatar for GliderPilot
0
177
Member Avatar for AndreRet
Member Avatar for AndreRet
0
187
Member Avatar for geneh23

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]#`

Member Avatar for LastMitch
0
348
Member Avatar for LastMitch

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); }

Member Avatar for LastMitch
4
307
Member Avatar for masocha

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 …

Member Avatar for blocblue
0
307
Member Avatar for codingweb

Is this code tossing an error? Security issues aside, nothing is jumping out at me as being wrong

Member Avatar for diafol
0
82
Member Avatar for wycliffe.ottawa

`$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 …

Member Avatar for wycliffe.ottawa
0
169
Member Avatar for numele

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"; }

Member Avatar for AleMonteiro
0
287
Member Avatar for McLaren

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];`

Member Avatar for McLaren
0
99
Member Avatar for roheath_1

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. …

Member Avatar for cigoL..:)
0
148
Member Avatar for flynismo

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 …

Member Avatar for flynismo
0
124
Member Avatar for cezarjont

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 …

Member Avatar for GliderPilot
0
183
Member Avatar for AMADH

Are you sure the catagory is being set properly? What do you get if you var_dump($cat); or echo $query; ?

Member Avatar for AMADH
0
124
Member Avatar for xXghostXx

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

Member Avatar for xXghostXx
0
334
Member Avatar for joseph.akinadewo

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.

Member Avatar for joseph.akinadewo
0
326
Member Avatar for jayson.ako

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']; …

Member Avatar for jayson.ako_1
0
128
Member Avatar for keltik

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 …

Member Avatar for cguan_77
0
208
Member Avatar for Khav

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 = …

Member Avatar for Khav
0
4K
Member Avatar for Gearspro
Member Avatar for Goldfinch

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/

Member Avatar for GliderPilot
0
132
Member Avatar for jdgrinder

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 …

Member Avatar for JorgeM
0
2K
Member Avatar for Goldfinch

your return and line feed characters have double slashes which causes them to be ignored should be \r\n

Member Avatar for Goldfinch
0
203
Member Avatar for AndreRet

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>

Member Avatar for AndreRet
0
276
Member Avatar for rotten69
Member Avatar for rotten69
0
132
Member Avatar for bilal.saim

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 …

Member Avatar for diafol
0
193
Member Avatar for iblend

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

Member Avatar for GliderPilot
1
185
Member Avatar for randomkid73
Member Avatar for MWEB

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.

Member Avatar for MWEB
0
142
Member Avatar for kitschkath

What you're referring to is called pagination. If you google php pagination tutorials you'll find plenty.

Member Avatar for kitschkath
0
48
Member Avatar for ddanielsmith
Member Avatar for simplypixie
Member Avatar for technoknol

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 …

Member Avatar for GliderPilot
0
87
Member Avatar for MWEB

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.

Member Avatar for MWEB
0
104
Member Avatar for Ravi8686
Member Avatar for Waleed Baig

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?

Member Avatar for GliderPilot
0
178
Member Avatar for Szabi Zsoldos

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

Member Avatar for Szabi Zsoldos
0
180
Member Avatar for akasekaihime

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

Member Avatar for veedeoo
0
267
Member Avatar for OldDeveloper01

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?

Member Avatar for OldDeveloper01
0
433
Member Avatar for SQLpower

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 …

Member Avatar for nidayaqoob1230
0
198
Member Avatar for simplypixie

Are you including the dollar sign ($) in your price? If so make sure you escape it \$ or ASCII it

Member Avatar for simplypixie
0
148

The End.