
MDCode
Members-
Posts
640 -
Joined
-
Last visited
-
Days Won
1
Everything posted by MDCode
-
Code Review, Beta Testing and Help needed with new site
MDCode replied to r3wt's topic in Beta Test Your Stuff!
It happened with my iPhone and android tablet. I don't have desktop access atm. -
Code Review, Beta Testing and Help needed with new site
MDCode replied to r3wt's topic in Beta Test Your Stuff!
I'm confused. Is this a beta test request, or a JQuery help request? You site just redirects to a page that only displays the URL. -
Using AJAX with jQuery to update a PHP variable
MDCode replied to Molson31's topic in Javascript Help
So you want to set a variable in PHP from JQuery? As far as I know, there is no way to do it once the page is finished loading. Is there a reason why you can't just use the variable from the js? -
You could just use file(); Edit: $array = file($filename); print_r($array);
-
You have to give more information. How is the list provided? Is it a giant string separated by commas? Is it an array?
-
What have you tried so far? No one is going to sit here and write it completely. The best you'll get is a template. Here's a thing to consider: 20000 bytes is 0.02MB (give or take). That will deny most if not all music files.
-
There are a few ways to connect to an api. The most popular in API documentation being file_get_contents(); <?php $response = file_get_contents("URL here"); echo "Response from the server was: ".$response; ?>You could also use cURL if you would want to add more advanced options. But this should work as you only need json it seems.
-
Ignore
-
So are you coding it, or trying to forge one? The company should have sent you or displayed to you your "secret key" at one point or another.
-
Need Help with Cubecart/SQL Database Error Code!
MDCode replied to mangodesign's topic in Applications
Not much we can do without seeing the code. There haven't been any bug reports on it according to their site. -
There doesn't seem to be any bug reports in 5.3.25+ on the issue. My guess is that your browser is just decoding it. You can test by entering " onclick="javascript:alert(String.fromCharCode(88,83,83))" and if it alerts when you click it, then something is going on.
-
PHP can not be parsed in a js file unless you configure your server to. Even then, PHP is server-based and will parse before js. So, It would be like setTextBox(-contents of file will be here-);
-
So you would take out the LIMIT 1?
-
ORDER BY id ASC(or DESC they always confuse me) LIMIT 1 Edit: I believe it is DESC...idk you can try both
-
Ignore.
-
It looks like you specified 12 column names but have 13 values (have a history of bad counting). There's no error?
-
You're supposed to replace // Do it with the rest of your code so that it checks before processing. Just wrap the conditional around it.
-
Add the server request method to your conditional that already exists. Try adding $errors = array(); at the top just before you check if companyname is empty.
-
Just add a simple extra condition. if($_SERVER['REQUEST_METHOD'] == "POST" && count($errors) == 0) { // Do it }
-
The problem is that you are only defining $errors when the request method is post, but are running the sql when $errors count is 0, hence when the page is loaded, it won't be defined and will run.
-
$radio = mysqli_query("SELECT imageposition FROM newsimage WHERE imageposition EQUALS newsitem.niid=newsimage.niid"); $radio = mysqli_query($con, $radio);You're still double querying here. One without the connection variable. while (($tnrow = mysqli_fetch_array($radio)); { if ($tnrow == 'Centre') { echo "<p class='newsmore'> <a href='newsitem3.php?i=" . $tnrow['niid'] . "'>Read More</a></p>"; }else if ($tnrow == 'Right') { echo "<p class='newsmore'> <a href='newsitem2.php?i=" . $tnrow['niid'] . "'>Read More</a></p>"; }else if ($tnrow == 'Left') { echo "<p class='newsmore'> <a href='newsitem.php?i=" . $tnrow['niid'] . "'>Read More</a></p>"; } }$tnrow will hold an array. You can't match an array to a string, you have to use which row of $tnrow As for your unexpected < error, your echo isn't using any quotes on that line
-
Updated code?
-
You're mixing mysql_fetch_array with mysqli extensions. No need to switch to mysql extension just because of one missed i.
-
In your while loop your conditionals are referring to $radio, the name of your query result. I believe you wish to use $tnrow instead. Edit: You are using mysql_query on $radio with $radio already using mysql_query. Change $qresult to $radio in your while loop or unquery $radio.
-
The file is named checklogin.php. It seems to be a login. Not a registration.