
GetFreaky
Members-
Posts
46 -
Joined
-
Last visited
Everything posted by GetFreaky
-
Well Object-C provides sort of both ends don't you agree? it has those low-level functionalities, not the same as Assembler I agree, and it has embbed high-level concepts, I think it plays well with both.
-
I misunderstood, thats why I was wondering why your code looks a little funny to me, but that makes sense what you are trying to do. When you say I thought you ment these folders already exist. You need to use the mkdir function to create the folder, now I'm confused as to what the png is for, is this a file that already exists based on a ID, or is this a new png picture you are generating with php?
-
sorry I forgot to add the $conn->query try <?php $conn = new mysqli("****", "***", "****"); $conn->select_db('mynotesdatabase'); $result = $conn->query("SELECT * FROM " . $_GET['Folder'] . " WHERE Name='" . $_GET['Name'] . "'") or die(mysql_error()); while($row = mysqli_fetch_array($result) or die(mysql_error())) { echo "<br>"; echo $row['Main']; echo "<br>"; } echo "<br/> <a href='javascript:history.back(-1);'>Back</a>"; ?>
-
Cron Job! Seems to be something wrong with my php
GetFreaky replied to oracle765's topic in PHP Coding Help
from OP I understood that the his query is faulty and doesn't generate the table values... however mysql_error() should ouput if something is wrong, and its still blank page with no error. Unless a new entry is inserted with blank values, then what I said above is irrelevant. -
Cron Job! Seems to be something wrong with my php
GetFreaky replied to oracle765's topic in PHP Coding Help
This could be a configuration problem, check your Apache's error log OP. -
No problem, everyone helped out equally as well, Is your code working now?
-
Cron Job! Seems to be something wrong with my php
GetFreaky replied to oracle765's topic in PHP Coding Help
Btw, could you try to print 1; On the top of your script, to see if file even runs the code. You said its a blank screen/no error output, its what I'm seeing also. -
Some issues at first glance, there is no spaces here FROM" . $_GET['Folder'] . "WHERE try <?php $conn = new mysqli("****", "***", "****"); $conn->select_db('mynotesdatabase'); $result = $conn->("SELECT * FROM " . $_GET['Folder'] . " WHERE Name='" . $_GET['Name'] . "'") or die(mysql_error()); while($row = mysqli_fetch_array($result) or die(mysql_error())) { echo "<br>"; echo $row['Main']; echo "<br>"; } echo "<br/> <a href='javascript:history.back(-1);'>Back</a>"; ?> Any reason why your table name is from a HTTP var? Also your query is susceptible to unwanted injection.
-
There is a undefined variable $x prior to your for loop, where are you getting this variable from. $_FILES['data']['name'][$x].',
-
What you are trying to accomplish with the way you have implemented two variables into the url won't work, because one or the other may not exist, you need to test certain conditions before stamping a direct/file/ as existent, and readable. Firstly you need to check if the directory exists, then check if its readable, followed by checking if the file exists. If all those conditional statements prove to be true, then you can construct your url as such $file = '/var/www/html/public_html/svsshc/'$_date'/'.$_REQUEST['id'].'.png'; Also where is your $_date variable coming from? Is it from a database,user input, external data, local...etc
-
Cron Job! Seems to be something wrong with my php
GetFreaky replied to oracle765's topic in PHP Coding Help
op are you sure your database credentials are correct -
I ment [[UITabBarController alloc] init]
-
Where is your $email variable? also where have you declared your $row variable? It seems to me that you are editing code that isn't written by you? If so, do you understand how to fetch the result from a mysql query? Your terminates prior to sending the email
-
If anyone has worked with Objective C, especially with Apple's Cocoa framework, then you will understand @interface myCustomController : NSObject @end @implementation myCustomController @end or objects/functions UITabBarController * tabController = [[UITabBarController] alloc]; [objectReceiver objectMessage:param1:param2]; Is it just me or is Obj-C actually beautifully written, I see alot of people complaining on the syntax and it looking messy. I do understand the frustration at first trying to figure out at the square brackets... Personally I think the syntax for invoking class methods/instance methods, interface/implementation, delegate, structs...etc is better than c++. what is your thoughts?
-
I use to be one of those authors, and I even wrote a tutorial however the author membership didn't do anything, I couldn't post the tutorial.
-
Your missing a double quote I believe at the end of your $autoreply string.
-
// url variables $date = '2014-01-07'; // you need to specify the date, and make sure its legal characters $filename = $_REQUEST['id']; // the filename (not sure why your specifying the extension in your code // construct url $folder = realpath("/var/www/public_html/$data/"); // use dirname if your using clean url $file = $folder . $filename; // check if folder exists if(is_dir($folder) && is_readable($folder)) { if(file_exists($file)) { // do code here. } } You need to check if the folder exists and is readable, then the rest is up to you.
-
Are you looking to find the folder based on a range of dates or 1 specific date?
-
No problem champ. thats my account btw, I tried everything to regain it back, so I logged in with facebook instead. Hope the mods don't mind. I'll make this my official account.
-
Just a small rant Global, as one user mention kills a cat every time you use one, (staff member signature) It is bad coding practice and you run the risks of overriding variables set in other parts of your code. Since Global are just that "Global", they put more stress on the server to find and grab, the program needs to go outside to the global namespace. While local variables are encapsulated in the current code. Think of the Storage Hierachy of a machine system There is the CPU Registers located inside the CPU unit, there is Processor Cache, RAM, Haddrive. In that order, from the latter and up, the harddrive is external to the CPU and takes much longer to load data from, hence we use RAM to run programs, but if the CPU needs data even faster it uses the processor cash and the general purpose registers for storing quick data. Register are local to the component using them, there is no reason, if not required for the component to grab data elsewhere, when it can store and use the same data in a local storage. Its like Going to the Avondale which is 1 block away (CPU REGISTER) vs Going to the super market 5 km (HARDDRIVE) away for the same exact item. Moral of story: I really suck at explaining things and... Use local variables. end of story.
-
print $ext, and see what you get.
-
An array has a set of indexes, much like memory address, its has an address (key) and a value. -> SongArray [0] => "Song 1" [1] => "Song 2" [2] => "Song 3" - > Invoke Shuffle(SongArray) -> SongArray [0] => " Song 2" [1] => "Song 1" [2] => "Song 3" Index 0 of the array will most likely never contain the same value after using shuffle, so it only makes sense to grab the index 0.
-
Completely missed it, thanks. Sorry for going off-topic a little there.
-
Well it seems that your if statements all over the place. Simple store the POST variable $field = $_POST['field_name'] As long as your not checking using a if statement like the code you have here: $msgSubject = (filter_var($_POST['formSubject'], FILTER_SANITIZE_STRING)); if ($msgSubject == ""){ $subjectError = true; $hasError = true; }else{ $formSubject = $msgSubject; };