Hay guys. I'm kinda new to OOP in PHP. I've learnt how to write and create objects. Is there a way to take an object and pass it to another script? either using GET or POST or SESSION or whatever. If there isn't how would i assign an object some variables on one page, then assign the same object more variables on another page?
Thanks
...
I'm having a bit of a weird situation here. I have a form that submits using the GET method for a search function. On the subsequent page after a search, all the variables are displayed in the URL even if they are empty. For example if I make a search for movie title equaling "hello," I'll get this:
/GetResults?title=hello&year=&directo...
I'm working on a set up where the URLs will be along the lines of:
http://example.com/index.php?page=about
In reality they will rewritten to that from a simpler URL. index.php will include another page, using this code:
if ( isset( $_GET['page'] ) )
{
$page = $_SERVER['DOCUMENT_ROOT'] . '/pages/' . $_GET['page'] . '.php';
if ( is_f...
Hi, I'm new to Jena API's , I'm trying to figure out a way to get the base Namespace from a OWL ontology file, without using DOM or similar but just using the standard Jena's API. Is there such a way??
in an OWL file like
how do I get the base namespace "http://www.owl-ontologies.com/Ontology1254827934.owl" a runtime??
Many many than...
greetings,
I'm new with java script so bear with me!
I want to achieve something using JQuery selectors.
I have a list menu. It looks like this...
<ul style="width:auto">
<li>item one</li>
<li>item two</li>
<li>item three</li>
<li>item four</li>
<li>item five</li>
</ul>
Okay, so currently I'm using the parseInt function to retrieve...
The title pretty much says it. I have an element that doesn't have a background image. I set one (a spinner) during an Ajax request using jQuery's css() method, then clear it with removeAttr("style") to revert back. Only one request is running at a time.
This, however, causes a GET for the background image not just the first time, but l...
I've run into an issue with mod_rewrite when submitting forms to our site perl scripts. If someone does a GET request on a page with a url such as http://www.example.com/us/florida/page-title, I rewrite that using the following rewrite rule which works correctly:
RewriteRule ^us/(.*)/(.*)$ /cgi-bin/script.pl?action=Display page in this...
This phpinfo() demonstrates the problem.
I'm passing the URL a query string of:
?qwerty=asdfg
As a result, I'm expecting it to list these two PHP variables:
_REQUEST["qwerty"] asdfg
_GET["qwerty"] asdfg
And also this query string:
_SERVER["QUERY_STRING"] qwerty=asdfg
However, it's not working. None of these variables seem to be...
Hi there,
I am working on a small project for learning PHP better.
This project has a primary file, which opens another website (e.g. youtube) by using fopen + fread. (or file_get_contents ?)
The site will be saved into a variable and after that a function will parse the file's content and should replace certain items with advanced con...
I suppose I could use PHP to access $_GET variables from JavaScript:
<script>
var to = $_GET['to'];
var from = $_GET['from'];
</script>
<script src="realScript" type="text/javascript"></script>
But perhaps it's even simpler. Is there a way to do it directly from JS?
...
Is it a bad practice to mix GET and POST? (note this is in PHP)
e.g.
<form action="delete.php?l=en&r=homepage" method="post">
<!-- post fields here -->
</form>
...
This may seem like an odd one, but I want to be able to fill in a static web form using values passed in via a GET param list.
Say I have a page, 'self.html':
<form action="self.html" method="get" accept-charset="utf-8">
<label for = "40">New Question?</label>
<input type="radio" name="40" id="40" value="Yes"> Yes
<input ...
I need to request web page client-side and than pass it to server as a string. I tried jQuery:
$.get(
"http://example.ru/",
{name:"Joe", age:"42"},
function(data){
$.get(
"script.php",
{data:data, query:query},
)
});
});
but did not succeed. I suspect it failed because of custom ...
What is the best way to implement simple pagination?
Here is the code im using to put the items from the database into a table:
$sql = "SELECT * FROM table WHERE id='id' ";
$result = mysql_query($sql);
while($row=mysql_fetch_array($result))}
echo($row['id']);
echo($row['name']);
}
I just wanted to pageinate this so i would u...
I'm working on someone's code and they have a constructor that uses:
class qwerty {
public function __construct(){
// some other code
$this->get = $_GET;
}
}
My question is this: Is it possible to sanitize the data within the constructor?
Even using some simple function like strip_tags()?
Example of usage:
$qwerty = new qwerty;
...
All,
I need to create an app for work that signs into our website using SSL and returns our member information.
I have figured out how to log in but am not sure how to find the id tags that I want to bring into my app and store to be show in a table view.
I know how to do these three things.
Put in username and password,
authentica...
How do you force a web browser to use POST when getting a url?
...
I just noticed that say
http://s7.addthis.com/js/250/addthis%5Fwidget.js#pub=PUBID
does the equivalent of
http://s7.addthis.com/js/250/addthis%5Fwidget.js?pub=fct-250
but is much faster. How does that work? O_o
I'm including the above links in a < script src call. Its supposedly faster according to one of the addthis developers. ...
Hi i am inserting a row of data into a table through nhibernate, how to get the Id(auto number)of the last inserted row? please help me...
...
I'm now doing this:
rewriterule ^jobs/([0-9]+)/.* job.php?id=$1
Which will erase parameters in jobs/1010/title?k=v
How to keep them?
...