Wildcard Cookie

Apr 12, 2007

what would make IE not take wildcard cookies. works in forefox however. domain: .example.com PHP:

session_set_cookie_params ( 60*60*24*2, '/', '.example.com', false);

ADVERTISEMENT

Wildcard Help?

Sep 13, 2001

I'm trying to do the following and it's not working.

if ($compare_product == '***%'){
echo ("<p class="footnote">***UDL packages trade name product</p>
");
}

So basically i'm saying that if $compare_product begins with *** then print the message.

View 3 Replies View Related

My Wildcard

Sep 2, 2006

I'm working on making my MySQL and PHP web database searchable. I'm testing on searching on a field called strAddress, which holds the street address. The sample population of the street addresses is:

1 Caroline Street
13 Caroline Street
Caroline Street

On the calling page this anchor tag successfully finds the one record with the "Carloine Street". I want to use two wildcards in the anchor tag to find all of the above 3 addresses. This does not work, it returns no records. What's wrong? Can I not start the variable assignment in the link with a wildcard?

View 1 Replies View Related

Wildcard DNS

Jul 17, 2005

It's a shorter URL site. But you can name the links instead of just getting a random string (you have that option as well). Does this seem like something people would use?

View 15 Replies View Related

Using Wildcard

Feb 16, 2005

I am attempting to setup an array and want to use a wild card. I have different catagories with multiple pages in each catagory.

The pages in each catagory will have the same titles and same metatags, but the titles and metatags will be different in different catagories. I know Im rambling thisd is what I want to do will it work or is there an easier way. Code:

View 1 Replies View Related

Wildcard

Jun 15, 2005

I want to show the last digit of a members ID like:

ID 46 = 6

I thought i could use % to define the first number, but i only get error messages...

Anyone who knows what I should do?

View 2 Replies View Related

Wildcard With Php Self

Oct 28, 2007

i have scripts and pages that only respond in certain "Cities" on my site... by doing this is put the first letter of each city infront of the script names so there are all like Lhome.php Lgym.php etc Now what i want to try and do is something where by using $_SERVER['PHP_SELF']

I want to use a wild card to do if $_SERVER['PHP_SELF'] begins with L wildcard then ok, else header location "phpscript.php"

View 9 Replies View Related

Wildcard?

Oct 11, 2007

I have a script which receives _POST data from a program. I need to make sure that any data that has 747 in it, will be given a value I determine.

I was thinking about something along these lines:

$aircraft = $_POST[aircraft];

if ($aircraft == "%747%") {

$aircraft = "B747";}

Would that work? I was thinking along the lines of the mySql LIKE commands where a % would be a wildcard. In other words, I want to check the variable $aircraft and if this variable has any reference to "747" (ej. Boeing747 or B747-200, et etc), then it will simply make it "B747".

View 7 Replies View Related

Wildcard Question

Jul 17, 2005

"Recent Visits" list, I try to exclude all *.googlebot.com and the
like.
Now, I tried the following:

if (($HOST != "*.blah.com")
AND ($HOST != "*.googlebot.com")
AND ($HOST != "*.inktomisearch.com"))
{
// log this host
}

Nevertheless, it doesn't work.
How would I use the wildcard? I did not find any documentation on
wildcards.

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

View 4 Replies View Related

Str_replace With Wildcard

Feb 8, 2007

Any ideas to use a wildcard for numbers between brackets, 4-5 digits in length ??

example:
.sflor/12345/

my attempts - non-working

$page = str_replace (".sflor/??WILDCARD??/", "", $page);
$page = str_replace (".sflor/./", "", $page);
$page = str_replace (".sflor/[0-9]/", "", $page);

ideas welcomed.

View 1 Replies View Related

Preg_replace Wildcard

Nov 23, 2005

"<div id="album0">No image found." until "</div>" and replace it with nothing so that its empty in that part. im not sure if i should be using preg_replace for this type of usage but i dont know anything else, if you could help out a bit it would be nice

Another problem, is that inbetween the "<div id="album0">" and "</div>" there are also another set of div tags, starting and ending tags.

View 1 Replies View Related

Wildcard Link

Jun 7, 2007

Instead of this:

echo "<a href="../ccdsv/images/$inv_no.jpg">";
echo "<img src="../ccdsv/images/thumbs/tn_$inv_no.jpg">";

Something like this

echo "<a href="../ccdsv/images/$inv_no*.jpg">";
echo "<img src="../ccdsv/images/thumbs/tn_$inv_no*.jpg">";

View 3 Replies View Related

Wildcard Search

Jan 29, 2006

Could someone tell me whats wrong with the following wildcard query please

$query="SELECT * FROM table WHERE $field = '$accno .% ' ";

View 2 Replies View Related

Wildcard Replace

Jan 10, 2006

I have around 45 or more paragraphs that goes like this:

1. START... bla bla bla ...END
2. START... bla bla bla ...END
3. START... bla bla bla ...END

Now I want php to search and replace the "bla bla bla" portion to "-hidden text-".
For example,

I want to search all "START*END"
and replace with "START -hidden text- END"
for all paragraphs.

The thing is I want to search with a wildcard and replace the text.
Is it possible? Can someone please help me with this?

View 2 Replies View Related

Wildcard With A Variable?

Mar 20, 2006

$query = "SELECT * FROM words WHERE word='$l%'";

This is for a dictionary thing that I'm making. All the spelling in there is correct, but it doesnt return anything.(there is one word in the dictionary and it is "word" and when ?l=w it returns nothing) I was wondering if this is a mysql problem or does it not like to have a % next to a variable?

View 4 Replies View Related

Wildcard DNS With URI Request?

Mar 16, 2010

I want to redirect name.domain.com/trips/1 to domain.com?username=name&trip=1 using modrewrite. Is this possible? I have the dns set up correctly however - I am unsure about the htaccess file. Can I link all this information to one PHP or do I need to create a directory for every user?

View 2 Replies View Related

Check Wildcard URL

Jul 4, 2007

I'm looking for a function that will help me determine whether or not a URL entered by a user matches specific requirements. This is done using $_POST.

Basically the format of the URL must be either: www.example.com, *.example.com, www.example.*, or *.example.* - or some kind of combination such as www.url.com*. I don't want to allow a star in the 'url'. So in theory, to check this, all i would have to do is make sure the string contains: [www and/or *].[text].[text and/or *]

View 3 Replies View Related

Why Is This Acting As A Wildcard?

Aug 28, 2007

The input value is $Street = "Regent Street"

the validation check im using is:

QuoteElseIF($Street = " "){
die('You must select a street at the estate agents first!');}
Now in the IF check i have " " not "". I have done the check for "" but because i had a list box and one was blank with a " " option i had to put the check for it also. But for some reason im assuming the else if is finding the space between the 2 words and so the result becomes:

You must select a street at the estate agents first!

So is my if statement acting as a wild card to find the space " "? Cos im lost on why its showing the die.

View 2 Replies View Related

Basic Script To Test A Cookie - Browser And The Cookie Wont Show Up On The Page?

Sep 17, 2009

I have a basic script to test a cookie.

Login.php
<?php
include('connect.php');
$username = $_POST['username'];[code].....

Error:

Undefined index: user in C:\wamp\www\scripts\menu.php on line 14

I looked in my browser and the cookie is there with the right name but it wont show up on the page.

View 9 Replies View Related

Passing MySQL Wildcard Into URL

Jul 17, 2005

I have a search feature where users can search a database. All works
very well except for one small annoying bug.

If a user searches for anything using wildcards and the '%' is the
FIRST character searched for, my pagination routine doesn't pass the
correct value.

Say the user enters %300. The page displays the correct data for the
first page, indicates that it is page 1 of 11 and when the NEXT link is
clicked, the value changes to 00. I haven't figured out why the %3
drops, however I suspect it may be my use of quotes. Particular code is
below. Can anyone help me?

Platform is Apache on FC3, MySQL and PHP. Browser being used doesn't
matter.

<?
if($pageno == 1) {
echo "<TD CLASS=upperLinks>FIRST&nbsp;</TD><TD
CLASS=upperLinks>PREV&nbsp;</TD>";
echo "<TD CLASS=data1>FIRST&nbsp;</TD><TD CLASS=data1>PREV&nbsp;</TD>";
} else {
echo "<TD CLASS=data1> <A
HREF='{$_SERVER['PHP_SELF']}?pageno=1&searchfor=$searchfor&searchtype=$searchtype'
CLASS=upperLinks>FIRST</A></TD>";
$prevpage = $pageno - 1;
echo "<TD CLASS=data1> <A
HREF='{$_SERVER['PHP_SELF']}?pageno=$prevpage&searchfor=$searchfor&searchtype=$searchtype'
CLASS=upperLinks>PREV</A></TD>";
}
?>
<TD CLASS=data1>(Page <?=$pageno?> of <?=$lastpage?>)&nbsp;</TD>
<?
if ($pageno == $lastpage) {
echo "<TD CLASS=data1>NEXT&nbsp;</TD><TD CLASS=data1>LAST&nbsp;</TD>";
} else {
$nextpage = $pageno + 1;
echo "<TD CLASS=data1> <A
HREF='{$_SERVER['PHP_SELF']}?pageno=$nextpage&searchfor=$searchfor&searchtype=$searchtype'
CLASS=upperLinks>NEXT</A></TD>";
echo "<TD CLASS=data1> <A
HREF='{$_SERVER['PHP_SELF']}?pageno=$lastpage&searchfor=$searchfor&searchtype=$searchtype'
CLASS=upperLinks>LAST</A></TD>";

View 5 Replies View Related

Wildcard On File Exists

Sep 4, 2007

Is it possible to run something like:

if(file_exists("dir/h*.jpg")) { something } else { something else }

View 1 Replies View Related

Can I Pass A Wildcard To This Function?

Jun 14, 2007

Is it possible, accidentally or on purpose, to pass a
wildcard to this function that would have the effect
of deleting many or all rows (shortname is a unique,
non-null field)?

function delete_row_by_shortname($table,$shortname){
global $mysqlhost, $mysqlusr, $mysqlpw, $mysqldb;
$link = mysql_connect($mysqlhost, $mysqlusr, $mysqlpw);
if (!$link) {
die('Not connected : ' . mysql_error());
}
mysql_select_db($mysqldb) or
die ('Could not select database:' . "$mysqldb.");
$query = "DELETE FROM $table WHERE shortname='$shortname'";
mysql_query($query) or die ("Query Failed! mysql_error()");
$value = mysql_affected_rows($link);
mysql_close($link);
return $value;
}

View 3 Replies View Related

Wildcard Search On Array

Dec 14, 2005

I have this search-thingie that searches through a text file for occurences of user input string (from a form). Everything works fine untill user wants to do a wildcard search. I'm not sure if that is the right term for that, but I am talking about searches with * and ? in it. Is there a way to do these kind of searches from an array? Any help is welcome.

View 1 Replies View Related

Wildcard Search Problem

Nov 10, 2006

I have a search field that is numeric and can contain up to 4 digits. When I query using LIKE I'm getting all numbers that contain the queried integer. How can I constrain to just the desired number? var2 is the number Code:

$var1_Recordset2 = addslashes($_GET['name']);
$var2_Recordset2 = addslashes($_GET['class']);

mysql_select_db($database_mt_connect, $mt_connect);
$query_Recordset2 = ("SELECT * FROM mt_students WHERE sname like '%".$var1_Recordset2."%' and class like '%".$var2_Recordset2."%'");
$query_limit_Recordset2 = sprintf("%s LIMIT %d, %d", $query_Recordset2, $startRow_Recordset2, $maxRows_Recordset2);
$Recordset2 = mysql_query($query_limit_Recordset2, $mt_connect) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);

View 3 Replies View Related

Wildcard A Href Id With Jquery?

Jul 3, 2011

I have a series of links as so:[URL]

Is it possible with jquery to have it execute a function if anything with an id of linkXX is clicked and then shuttle you over to the link target? The links themselves will be variable in number, target and id name, the only unifying feature is that the id will always have the words 'link' followed by 2 numbers.

View 3 Replies View Related

Mysql Query Against Wildcard?

Feb 23, 2010

I have a mysql query in php, using match / against to filter results. Im trying to get a wildcard after $string so the next character can be anything. "SELECT * FROM $table WHERE MATCH (message) AGAINST('$string%' IN BOOLEAN MODE)"

View 2 Replies View Related

Using A Wildcard In Script Unlink?

Jun 24, 2011

I am currently making a php script to graph a bunch of data from a DB, arrange it into text files and then run a GNUPlot script to generate graphs. I have all of this working , now all I need to do is delete the text files I don't need anymore.

What I have been trying was gotten from another thread on a different forum:

foreach( glob('US_A.2.6.*') as $file )
{
unlink($file);
}

The problem, however, is that it doesn't work. The files have complex end names:

US_A.2.6.1.1a.txt
US_A.2.6.1.2a.txt
US_A.2.6.1.3a.txt
US_A.2.6.1.4a.txt
US_A.2.6.1.5a.txt
US_A.2.6.1.6a.txt

View 1 Replies View Related

Use A Wildcard As A Directory Level ?

Apr 17, 2011

What is the best way to skip over a directory level in PHP using some kind of wildcard expression?I have a config.php file that is unique to each child directory and I need to include it in the header of my page. What I want is to tell my main PHP page to include config.php when the name of it's parent directory may change?

Something like <?php include("http:[url]......

View 2 Replies View Related

Regex Preg_replace Not Getting Wildcard

Apr 20, 2009

I'm scraping a page and trying to remove the first part of the urls in a string of urls in the code. It needs to match a wildcard subdomain and a subfolder that has dashes in it. Here's what I've ended up with:

[Code]...

Note the forum won't let me post urls, which this is an example code, not an actual link, so replace the (put http here) with "http"

[Code]......

As you can see, it's pulling "domain" out of the subdomain instead of capturing the entire "subdomain". It's also not catching the entire subfolder after "item". ("item" is actually the first subfolder name so I can keep that in there) It's also removing the "and" which I want to keep since that's not part of the url.

View 3 Replies View Related

Set Wildcard In $_SERVER['REMOTE_ADDR'] ?

Nov 30, 2010

is it possible to set $_SERVER['REMOTE_ADDR'] to a wildcard, so that anyone on the network can see this?

<?php
if($_SERVER['REMOTE_ADDR'] == "112.200.150.212"){
?>
<a href="http://www.tinycounter.com" target="_blank" title="free hit counter"><img border="0" alt="free hit counter" src="http://mycounter.tinycounter.com/index.php?user=fortressgate"></a>
<?php
}?>

but i want the network can see the counter... so it would look like this?

if($_SERVER['REMOTE_ADDR'] == "112.200.150.%")

View 2 Replies View Related

Apache Wildcard Setup ?

Feb 11, 2010

I have apache setup to wildcard direct all unknown trafic to one php script (default documentroot). This php script looks into a database and possibly finds the correct documentroot for the requested domain (or documetroot of the 404 error handler etc..). The problem is, that from within php script I know how to include another script, but can not change the documentroot - ie. force apache to set the found documentroot for the request, read htaccess file, run scripts etc.. can I? Any other solution? Must be allready somehow solved and solution is probably not very difficult, but was not able to create a fully working setup so far.

View 2 Replies View Related

Wildcard Sub Domain Path ?

Jan 24, 2011

I have an htaccess rewrite for wildcard sub domains which rewrites

[code]....

View 2 Replies View Related

Direct To Wildcard Subdomain?

Jun 30, 2009

a small script which will direct a person to wildcard subdomain.There should be an input field, a kind of <input name="letters" type="text" /> and it should direct a person to "letters" wildcard subdomain. What the users write in the input field, it should be a subdomain name, eg. a user writes abc in the input field and then is directed to a Is it possible to build such a script?I was looking for a solution for several hours, in vain still... I don't know much php, so if you can

View 1 Replies View Related

If Statement With Wildcard Characters?

Aug 15, 2007

What I have is hundreds of names, such as   this-1 this-2 this-3.

The if statement I have so far is   if($blah == "this-")

How can I make it so that the if statement will be true if $blah at least matches 'this-' ?

View 3 Replies View Related

Wildcard For String Replace

Jun 2, 2007

In the following code I need to replace SOMENAME with a wildcard. SOMENAME changes on a regular basis so I have no constant. Code:

View 6 Replies View Related

File_exists With Wildcard For Extension?

Jan 8, 2010

file_exists with wildcard for extension. Is it possible to do a file_exists without an extension?I ask because I have about 750,000 if not more images, all of which follow a specific file_name format, that matches a key in a database I am working with. however, not all the formats are the same, I have gif, jpg, png, and I think maybe even a couple random .bmp. So I am trying to figure out if its possible to do anything like file_exists but without the extension, so that if it finds the file without the extension it will append the file type to the end of it so I can then call it out in html with img src...Anyone know if its possible? Can I use file_exists for something like this or am I thinking to much in the box with this, and need to broden my perspective of how I should build a function like this.

View 6 Replies View Related

Cookie Stored On Computer And Cookie Code In MySQL Database Does Not Match

Jun 6, 2011

I cannot work out why the cookie on my computer does not match the cookie id stored in the MySQL database.

I have this function creating a cookie

[Code].....

This mysql query does not work. The problem is the "cart.cookieId='" .GetCartId() ."'". Without this it is fine. With it, it does not work.

As you can see above the cookieId is defined by the GetCartId function. As far as I can tell it must match but with this bit of code it does not work.

View 2 Replies View Related

How To Write A Cookie To The Users Computer And Then Check To See If That Cookie Excists Before?

Jun 8, 2005

I've used sessions quite a bit, but I have never used cookies that are on the users computer.

In this project I am working on I need to have the user enter username and password and then if it's correct set a cookie on their computer that allows them to open new browser windows without having to re- enter the password. This isn't possible with sessions because when the browser is closed then the session ends.

Bascially, I just need to know how to write a cookie to the users computer and then check to see if that cookie excists before allowing access to certain pages.

View 2 Replies View Related

Wildcard - Delete A Row Once The First Variable Is Found

Jul 3, 2001

What can I use for a wildcard? I want to delete a row once the first variable is found like Name1. the problem is that the second part is encrypted. Is there a way to input the second variable so it matches the encrypted?

Name1:Mec3E.7GIcb9k
Name2:X9..uhgfderJuL

What can I use in this field that will pass any/or all that is listed. Code:

View 1 Replies View Related

Problems With Wildcard Characters Using Mysql_query() In PHP

Aug 13, 2006

We are using addslashes() before inserting data into mysql. Now, we face some problems while searching(selecting) particular data which contains slashes(as a result of addslashes..) by using LIKE statement. To compare such data we need to apply addslashes several times to our query data and it creates lot of problems to the further operations..

View 2 Replies View Related

Replace Part Of A String With Wildcard?

Oct 9, 2005

i replace everything betwwen two different characters:

<font face='Verdana, Arial, Helvetica, sans-serif' color=#FFFFFF size=3>
or
<font face='sans-serif' color=#0f0f0f size=3>

so all the font tags will change to <font size=1>

could i do "[<font] .*. [>]", "<font size=1>"

View 3 Replies View Related

% Wildcard & FULL-TEXT Searches

Jan 23, 2005

With regards to this SQL statement.... It works great for multi-word searches but those searches have to be spelled correctly. I have discovered two FLAWS:

1. It does not allow for partial matches: i.e. 'shane' if the search is spelled 'shan' it will not find it. I cannot figure out how to get the '%' Wildcard into this statement so it will work.

2. It will ony show results for the first column the search word(s) are found in.

For example, I type in 'shane' and I will get all listings for 'shane' only from the 'wname' column. The search query stops at the first column 'wname' in the SQL statement below and ignores that 'shane' is also located in several other columns and records. Code:

View 1 Replies View Related

Wildcard * Dont Work On Server

Dec 5, 2006

I am * wildcard in my localhost phpMyAdmin 2.5.3.

Problem comes if I use it online in my server using phpMyAdmin - 2.9.0.2.

It only accepts if I indicate all field names one by one. heres the code:
<? $sql = "SELECT * FROM tbl_news WHERE news_id = $news_id";

It only works if I use:
<? $sql = "SELECT content, picsmall, piclarge, news_id, title, dt_created FROM tbl_news WHERE news_id = $news_id";

What shall I replace * so I dont have to write all of my field names in the query?

View 3 Replies View Related

Search MySQL Using WHERE Wildcard Or An IF Statement?

Jul 3, 2010

I'm letting users search my database for data by city. My query looks like:

$results = mysql_query("SELECT * FROM mydb WHERE City='".$city."' LIMIT 10");

I want a user to be able to search 'all cities', so I'd like to either remove the WHERE statement if $city=='all cities'; or use a wildcard for the WHERE statement that matches all cities in the db. I used to have an IF statement that switched between two queries, but I want to add more filters like country/all countries, zipcode/all zipcodes, etc, So I'd rather keep one dynamic SQL query.

View 4 Replies View Related

Regex - Get String That Matches Wildcard?

Nov 11, 2009

I need a very specific function in PHP. Basically, I have two strings as arguments, one of which is a pattern that contains wildcards of variable length (*), and one of which is a string that matches that pattern. I need to get an array of the strings from the latter string that fill in the wildcards in the pattern.For example:

Argument 1: "This is * string that I *"
Argument 2: "This is my awesome string that I created myself"
Return: array("my awesome","created myself")

What's the cleanest way to do this? Bear in mind that these are not always strings of english words as in the example, they could be any random characters.

View 2 Replies View Related

ADVERTISEMENT