trq
Staff Alumni-
Posts
30,999 -
Joined
-
Last visited
-
Days Won
26
Everything posted by trq
-
<?php if ($result = mysql_query('SELECT mode FROM settings LIMIT 1')) { if (mysql_num_rows($result)) { $row = mysql_ftech_assoc($result); if ($row['mode'] != 1) { echo "<br /><br />"; echo "<p><span style=\"margin-left:8px\">"; include "endgame.php"; echo "</td>"; } } }
-
What exactly do mean? There is a whole series of mysql_* functions.
-
Strings need to be surrounded by quotes in php, string indexes within an array are no different.
-
What is the best approach to creating an online dating community
trq replied to abrahamwinchester's topic in PHP Coding Help
I work alone mostly so, no. I have been to a few seminars on the topic however and have started using a few of its ideals. For instance I try and use a vague form of story for everything and plan my work into fortnightly sprints of sorts. I'm sure its different when I'm the only one doing it, but yeah, I use parts of it I guess. -
There is a tutorial on our main site that covers UNIONS & JOINS, you should read it.
-
I DON'T APPRECIATE BEING YELLED AT!!!! Sounds like homework to me. We don't do homework.
-
If you want the url to change you need to change the page. There are ways of placing params within a url using anchor tags which allows book markable Ajax. However, without knowing your specific Ajax implementation you likely won't get allot of help in a simple forum reply. Google 'book marks ajax' or similar and you might find a few tutorials. This is however something that really needs to be though about from the startr of your application design and could require quite a bit of reworking if youve already got a significant amount of code.
-
What is the best approach to creating an online dating community
trq replied to abrahamwinchester's topic in PHP Coding Help
Pretty vague question. I would at least start with a wish list, eventually turning that into a spec, I would then start registering Issues from the spec into some issue tracking software (preferably one that allows scrum type integration). From there I would start organizing these Issues into priorities / versions then start working on them. -
! is the 'not' logical operator. @ is the error suppressor. ? : is the ternary operator.
-
I gave you a link to the manual which describes how to execute a query. Did you look at it?
-
Reload the page.
-
Your still not being at all clear.
-
If you want the variables to appear in the url, don't use Ajax.
-
Correct it? Its not at all valid php, you need explain what it is your trying to do. Execute a query? See mysql_query.
-
No its not. There is no php in the code provided.
-
page1.php <?php session_start(); $_SESSION['var'] = 'hello'; page2.php <?php session_start(); if (isset($_SESSION['var'])) { echo $_SESSION['var']; }
-
I would (at least) make sure to put all files that can possibly be included within a certain directory, then check for your files existence within that directory before including it. eg; function pageSwitch() { if (!$_GET['act']) { $use = "news.php"; } else { $use = $_GET['act']; } $this->file = $use; if (file_exists('includes/' . $this->file)) { ob_start(); include 'includes/' . $this->file; return ob_get_clean(); } }
-
Sorry, but very little of that last post made any sense to me.
-
So, at the moment then, this method simply returns the name of the file to be included? And you want it to actually return the included file? function pageSwitch() { if(!$_GET['act']) { $use = "news.php"; } else { $use = $_GET['act']; } $this->file = $use; return $this->file; } Should be.... function pageSwitch() { if (!$_GET['act']) { $use = "news.php"; } else { $use = $_GET['act']; } $this->file = $use; ob_start(); include $this->file; return ob_get_clean(); } I would be very careful giving users the ability to execute php scripts passed in via the url like that, this poses quite a few security issues.
-
addslashes
-
I don't see where you parse these {integrate} tags specifically.
-
A # within a url generally represents a named anchor (used by html). However, what you see facebook and youtube using is probably customized to there particular systems. it could be used by any language.
-
The easiest way to keep variables from page to page is probably to stick them within the $_SESSION array.
-
Considering that is where all the work is done, it would be most helpful.