AyKay47
Members-
Posts
3,281 -
Joined
-
Last visited
-
Days Won
1
Everything posted by AyKay47
-
well, keep back-tracing like this until you find the root of the issue.
-
So you will want to ad the username onto the querystring if the page to be redirected to: header("location:home.html?username=" . $myusername); then in home.php you will grab the value using $_GET['username'];
-
do var_dump($this->input->post('recipient[]');
-
this is the line that we care about: $this->pmmodel->sendMessage($this->input->post('recipient[]'), $this->input->post('bcc[]'), $this->input->post('subject'), $this->input->post('message'), $this->input->post('sender'))) you need to check the output of $this->input->post('recipient[]')
-
basically these lines are screwing everything: foreach ($recipients as $recipient) { $recipientData = array( 'usersPersonalMessagesID' => $insertID, 'userID' => $recipient ); } 1. $recipients needs to be an array, it's not. Do something like: if(!is_array($recipients)) { echo "not an array"; exit; } 2. You will just be redefining $recipientData every loop, overwriting the previous values. Do something like: $recipientData = array(); foreach ($recipients as $recipient) { $recipientData[$insertID][] = $recipient; ); }
-
then the SQL is simply not matching any results sets in the db table. Make sure the field types are correct and the values to be compared are correct etc..
-
Something is not right here, if the select statement was printing out as it should, it would grab results data from the table, but it is not. Post the entire relevant code.
-
and are these values correct?
-
alright, then try this: $sql = "SELECT * FROM project WHERE Module_Code = '$schemelevel' AND Available = 'Yes'"; $result = mysql_query($sql) or die($sql .'<br />'. mysql_error()); if(mysql_num_rows($result) == 0) { echo "no results <br/ >"; echo $sql; exit; } while ($myrow = mysql_fetch_row($result)) { //code }
-
What does the code look like?
-
Is there any other code in the page? Try this debugging code and post the results: $sql = "SELECT * FROM project WHERE Module_Code = '$schemelevel' AND Available = 'Yes'"; $result = mysql_query($sql) or die($sql .'<br />'. mysql_error()); if(mysql_num_rows($result) == 0) { echo "no results"; exit; } while ($myrow = mysql_fetch_row($result)) { //code }
-
mysql_query expects it's first argument to be a string containing valid SQL, which is what you have contained in $query. With $result, you are attempting to query a query resource, which is invalid, the code should read: $query = "SELECT * FROM project WHERE Module_Code = '$schemelevel' AND Available = 'Yes'"; $result = mysql_query($query); while ($myrow = mysql_fetch_row($result)) { //code }
-
I would stick with .josh example. Not to say that ragax example isn't a good example as well, but typically string functions run much faster and are more robust than regex procedures.
-
Tell me exactly what a view source shows. Are the forms there but they simply have no values at all?
-
1. the form action can just be action='' 2. Have you looked at a view source to make sure the values are what you expect them to be? 3. what does the function _e() do?
-
Let's stay on topic. OP: follow requinix suggestion and debug the query by outputting the SQL and checking for errors, then post the results.
-
What errors do you receive? Have you debugged this at all?
-
1. Refer to thorpe's first reply for reference to the first error. 2. The second error is caused by this line: $this->password = $this->md5(password); the function md5() is not derived from the Process class, but a PHP native function, so it should be just: $this->password = md5($password);
-
yes, the member table is needed to build relationships/references. no you do not need separate tables for just that data, the sender and recipient fields in the `message` table will relate to the member id field of the `member` table.
-
$firstName = (isset($_SESSION['memberFirstName'])) ? $_SESSION['memberFirstName'] : '';
-
the one thing I see wrong is you have the entire ternary wrapped in parenthesis, whereas you only want the condition wrapped. This could simply have been a typo, however wanted to point it out.
-
the forms action shown is "scripts/test.php", not process.php Be a little more descriptive as to what exactly is happening.
-
Would you create a new table, "Random" and have each id correspond to their initial account? Quite simply, yes.
-
I like your usage of different font sizes, colors and images to convey your issue/emotions to us. Just kidding.