Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Echo To A Specific Div On A Specific Page


Is it possible to echo something from a php file to a specific div in a different specific html file?If so, can you let me know how to specify where the data should displayed.

$myName="john";

echo '$myName'//but i want to echo to a different page on a certain part of that page.




View Complete Forum Thread with Replies

Related Forum Messages:
How To Echo / Insert A Specific Result?
This code selects from a previous page where the users entered some votes and select the 7 products they vote the most.

I want to be able to make them vote again but with the same products for a different question.
If i could echo each of the results from the query, i could insert each of the votes to a new table in the DB (MySql).

Here's the code...

View Replies !
How Can I Echo/insert A Specific Result From A Query?
This code selects from a previous page where the users entered some votes and select the 7 products they vote the most. I want to be able to make them vote again but with the same products for a different question.

If i could echo each of the results from the query, i could insert each of the votes to a new table in the DB (MySql). Code:

View Replies !
How To Tell To Send A Specific E-mail At A Specific Time
How to tell PHP to send a specific e-mail at a specific time (newsletter).

View Replies !
ECHO The Amount Of Rows In My Table According To A Specific Username
I am creating an infinite loop with this code. My goal is to just ECHO the amount of rows in my table according to a specific Username. How do I do this? my code:

<?php $query = "SELECT ID FROM products WHERE Username = '{$Username}'"; 
$result = mysql_query($query) or die(mysql_error());
$row = mysql_num_rows($result) or die(mysql_error());
$num = 0;
while ($num <= $row) {
echo $row;}?>

View Replies !
How To Echo A Single, Specific Line From A Text File
How do I echo a single, specific line from a text file?  Let's say, for example, the second line?

View Replies !
Go To Specific Page
I have a search box, then I put in search criteria, got a returned result. When I click on to view that result, I got a page that says "you have to login first". After I login, I want my page to go to that "result page" instead of the member page. Is there a way to do that?

View Replies !
Load A Specific Page
I now have a simple php stylesheet switcher. I will expand on it as my 'kung-fu' gets better,(using some of the ideas you guys posted in that thread), but for now, it will do. Onto my next quandary. Is it possible to always load a specific page or the same page into the browser every time a user returns to my site? I know you can use redirects to push them in a certain direction, but they look a little unprofessional. I'm looking to create something a little more seamless, and a hell of a lot more classy.

View Replies !
Sending People To Specific Pages That Are Coming From Specific Pages...
I want to show some specific pages to people that comes to my site from
specific urls, I know the variable $_SERVER['HTTP_REFERER'] will be
used but how?

For ex if the visitor comes from a site that is like:

I want to send this person a specific.php . I used below code but not
worked:

<?php

if($_SERVER['HTTP_REFERER'] == "www.cominghost.com" ||
$_SERVER['HTTP_REFERER'] == "cominghost.com" ||
$_SERVER['HTTP_REFERER'] == "www2.cominghost.com"){

// Specific page html goes here

}
else
{
header("Location: index.php");
}
?>

This code not worked for some cases like if the visitor comes from
http://www.cominghost.com/account/targeturl.php or
http://cominghost.com/account/targeturl.php Ok I know the if statement
not working but How?

View Replies !
Extract Specific Parts Of A Page
I have a js script that runs from a remote location, it displays the latest lottery results, but there are ad's on it, i would like to extract the gif/jpegs from it, can it be done and if it can how??

View Replies !
Getting A Form To Post To A Specific Page
How do i get it so that a form can be submitted and have the information post directly to a page that i can specify without having to use a database.  I just want a direct post that inserts the new information at the top of a page already created.  Basically so every time the form is filled out a new piece of information is above the last.

View Replies !
Include Specific Part Of Page
i know that the include() function allows you to include a page with php but how do i only include PART of a page like specific tables? what im trying to do is get the certain parts of this page: ...

View Replies !
User Login - Direct To Specific Page
If im looking to make a login system, that when someone login in with a specific username and password, it takes them to a specific page, ex.

login: world
password: world
page they must get sent to once logged in: world.php

login: hello
password: hello
page they must get sent to once logged in: hello.php

Can someone give me a start to it here please? been looking around but cant find a good explanation of it .

View Replies !
Make Sure User Is Referred By Specific Page.
I know this is possible because I have seen it in a few scripts before, but I forgot exactly how the language was put.

I have a link on a page inside a password protected folder, lets call it domain.com/protected/hide.php.

When the user clicks on the hyperlink, they will be redirected to domain.com/folder/page.php

I want to write somewhere on page.php to be sure the visitor came from hide.php, otherwise display an error message. How can I do this?

View Replies !
Is There Any Code In PHP That Shows A Page For A Specific Time?
Is there any code in PHP that shows a page for a specific time i.e 10 seconds and automaticlly redirect the page to the other URL ?

View Replies !
How Do You Display SPECIFIC File Types In A Directory On A Web Page Please?
Hello,

I have the following code:

<?php
$handle = opendir('images/');
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<a href="images/$file">$file</a><br>";
}
}
closedir($handle);
?>

which lists ALL the files in a directory as links on a web page. How do I limit it so it just shows Word documents for example?

View Replies !
HTTP_REFERER. Need To Capture URL Entered To Direct To Specific Page
I need to be able to capture the URL which the user has entered so that I may direct them to a specific page.

e.g. website is www.mainwebsite.com

However, I have several aliases for this website. If user enters www.specificsite.com (one of several aliases), I want to be able to capture that URL as a variable and open a specific page.

In this way, depending on the URL (alias) entered, I can direct visitors to specific pages on the site.

Is HTTP_REFERER the best way of doing this. If so,
what would be the code [I am not an experienced PHP programmer]

View Replies !
How Do You Spider A Page And Search For A Specific Anchor Text
I've scoured the net for some simple code and my regex experience is nill. I find the darn thing totally confusing. Anyone have some snippet of code that will grab a url, skip the headers, pull out all links in the body and provide anchor text to the link?

View Replies !
Finding A Specific Area From Page Using Regular Expression
i have a bunch of html pages and i want to fetch records from them and i m really confused how i can do after working with regular expressions and other stuffs from last few days can anyone help me with this ?

i have a pages with html and table all scatter there..now i want just specific table from the page and all records in that page, i was successfull somehow but still have problems ,here are they.. Code:

View Replies !
Form Processor To Redirect To A Specific Page Based On The Selection Of A Radio Button On The Form.
I need to have a form processor to redirect to a specific page based on the selection of a radio button on the form.

It would be like this:

If selection is button "A" then goto A URL
If selection is button "B" then goto B URL
If selection is button "C" then goto C URL

I don't know how to code in php or when I would put such a statement.

View Replies !
Specific IF/Then...
I have a code that displays a value from a row in a mysql db. The code is this:

echo "<td>" . $row['year'] . "</td>";

When the user submits their information, there is an option that says "hide the year I was born." Since the row for "year" is set it INT, if they choose that option it returns "0."

I was wondering if there was a way to do something like if $row['year'] = "0"{
echo"hidden by request"
}
else{
echo "<td>" . $row['year'] . "</td>";
}

but still have it work with my existing code.

View Replies !
How To Add An SPECIFIC Array
sorry if the subject isint really good to understand, now i will try to explain my best. I recently installed a hack in phpbb and that particular hack allows only 1 variable, but i want to add more than one, and i thought the best thing to do it is in an ARRAY, but i dont know how to do it in an array, the code looks something like this:

View Replies !
Getting Specific Fields From A CSV
I've been using fgetcsv to populate an HTML table with CSV data and so far it has been working great. But now I'm looking to call specific data from the table (ie: row 3, column 5), and I'm not sure fgetcsv can be used for this. Every online example of its use involves getting all the CSV data from a file as my table has done.

What function should I use to get specific fields from my CSV? My table doesn't use unique ids, at least not like mysql, with a unique number identifying each row in the leftmost column. What then should I use to identify each row from which I'd like to get data?

I'm making a page that describes a person based on the query string and the information in the database, in which each person has a row. So example.com/example.php?christopher+walken would bring up a page where Walken's information is listed. So I guess the ideal way to do what I want is to query the CSV for the name in the query string (Christopher Walken), then get and print the other information in the row (tall, great guy, etc). Any suggestions on this query?

View Replies !
How To Redirect With Specific Value ..?
I want that when i recieve different values from "form page" i will mail myself all the details and redirect the user to another site for CR Card payment. What i need is redirect the user to another site along with the value of total amount of package .How can I do that. I have done the first part of mailing but dont know how to do the redirection in PHP ..

View Replies !
Selecting Specific Tag
I am making a script which displays an RSS feed on my website. To do
this I would like to take all the <div class="blabla"><img src="bla.jpg"
alt="bla"> </div> tags and put them in front of my text. So the
following string:

<p>This is text blah blah blah</p>
<div class="blabla"><img src="bla.jpg" alt="bla"> </div>
<p>this is another text</p>

should give as output:

<div class="blabla"><img src="bla.jpg" alt="bla"> </div>
<p>This is text blah blah blah</p>
<p>this is another text</p>

I tried using regular expressions, but I do not really get it done. Here
is the code I use:

while(ereg('/<DIV class="blabla"*>(.*?)</DIV>/i',$content, $matches)){
$img=$img.$matches[0];
$content=ereg_replace('/<DIV
class="imgbar50"*>(.*?)</DIV>/i',"",$content,1);
}
what do i do wrong?

View Replies !
PHP Editor, Vim Specific.
Does anyone have a really good php indent file for vim? I'm working on
my first really sizeable project and I'd like it to be kept as clean as
possible while I'm working.

View Replies !
Country Specific
Any idea for a regular expression including all chars (all country
specific letters)?

View Replies !
Specific Record From DB
I have a form which updates customer information and as default this gets started on record 1. I would like to be able to post a clientname from a previous form and then get the specific data for that customer.

I am fine with the posting to seperate pages stuff but how could I get the update form to start on this record? Code:

View Replies !
Delete Specific Row Out Of 3
Say i have three rows:

row1
row2
row3

How do i make a mysql query to delete a specific row out of the 3 only? So say i wanted to delete row2 from the 3.. ?

View Replies !
Specific Pagination !
I've got some regular joe schmoe queries running ... now the totally result of these queries goes well over 2,000 records. Im looking to paginate these in a certain fashion :

<< Prev 1   2   3   4   5   6   7   8   9  10  Next >>

Each # obviously will display the page ! but Prev and Next will jump to either previous 10 or next 10... so if im on page 4 and i hit next ! i dont want to go to page 5 but rather page 11 and display:

<< Prev 11   12    13   14   15  16  17   18   19  20  Next >>

I hope this is doable ! if not please give me a better suggestion, a more effective and/or efficient way to be able to browse through all these records.

View Replies !
Specific Lines
I have the text file 'text.txt' and the contents of it are:

CodingForums.com
is not
cool

and i want to change only the 2nd line so the contents of text file is:

CodingForums.com
is very
cool
how would I do that?

also how would I read just the 1st line?the contents text file would be:

CodingForums.com
is very
cool

View Replies !
Specific Characters
i want to match some specific character set 10 odd characters in a user input string.
i want to find all occurences of the any of such characters. i am using preg_match_all for this.the string pattern that i am giving is a regular expression having those characters i.e "ch1|ch2|ch3" but i am getting only first occurence of the the char which is there in the regular expression. where i am goin wrong and how can capture all occurences of those chars.

e.g  pattern-  "x|y|z"

string to search "this is the X string for test Z and Y are at end and are not detected" in above case the character that is matched is only X at 13th position and z and y are not matched. i want to detect presence of all 3 chars. i.e x,y as well as z.
how can i achieve this.

View Replies !
Specific Include
I have read a lot of posts about the include statement and understand the majority but there is one small thing missing for me. Maybe you could help enlighten me.

I read that I can include htm files or php files. Therefore I have two senarios. 1. If I include using a htm within a htm page, how much do I need to write in that htm file that will be included. Code:

View Replies !
Getting Specific User
I have my login script, and I have it setup so that if they are not logged in it shows the login box, and if they are, it shows a welcome message. But how I can I get the specific username of the person who logged in, from the database? Here is my code:

<?php
if (!isset($_SESSION['authenticated'])) {
echo "<form id="form1" name="form1" method="post" action="">
        <label for="username">Username:</label>
        <input type="text" name="username" id="username" />
        <label for="textfield">Password</label>
        <input type="password" name="pwd" id="pwd" />
        <input name="login" type="image" src="images/login_button.jpg" id="login" value="Log in" />
</form>";
exit;
  }
echo "Hey, welcome back $username!";
?>

View Replies !
Get Specific Query
theres a set of links that derive from a database

when a link is clicked

you are fowarded to a page called list.php

in this page

i want to get certain information out of the database based on what link is clicked

so this is how it works PHP Code:

View Replies !
Delete A Specific Row
How can i delete a specific row from a mySQL table. I want to delete Image2 (or make the value of it is nothing, NULL)

<?php
$con = mysql_connect("localhost","name","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("npsari_other", $con);

mysql_query("DELETE Image2 FROM ads WHERE ID='$ID'");

mysql_close($con);

?>

Is this code right, because it doesnt work.

View Replies !
Specific Types
Is there anyway to count just the. jpg files in a directory? Right now I am counting all the files, but there are some file types I don't want to count.

View Replies !
Specific Time
How to tell PHP to send a specific e-mail at a specific time (newsletter)

View Replies !
Specific Variables
hi i was wondering how to count specific variables in an sql database and have it echo the count in a php script. below is what i have so far. PHP Code:

$query = "SELECT * FROM ibf_members WHERE mgroup";

    $result = mysql_query($query) or die("Query Ruter failed");

             while ($row = mysql_fetch_array($result));

View Replies !
Rows With Specific Ids
I have many rows in my database, all with ids which are not unique. I would like to count these ids and display the numbers in a loop. Like so.

Row 1 (67)
Row 2 (34)
Row 3 (234)

All ids that match the id of the row should be counted and displayed. I have tried this.

$count = mysql_result(mysql_query("SELECT COUNT(*) FROM table WHERE $id=id"), 0);

View Replies !
Returning Specific
I'm new to PHP. I have a properties database (MYSQL). When I click on a specific link,  the results show all the properties in the database, however what I need the results to show is not all the properties but ones that meet a certain criteria. I want it to show the ones that are listed as "Rentals" only.

View Replies !
Specific Truncating
I have a block of text stored in a variable, it's order data so it's always different. It's data that is sent back to me as is, so I can't get at what makes it up.

I'm trying to get the IP address from the middle of this block of text isolated and put into a variable. The IP always follows the words IP Address:

View Replies !
Looking For A Specific Script
I need to find a script that will allow users to submit their URL to my site and be displayed in a column. Along with that I would like it to have a hit counter to show how many times that link has been clicked. A good example of what I would like is on this site. http://www.lookom.com/. On the righthand side of the page is what I would like.

View Replies !
Specific Calender
I'm a designer by trade so PHP can sometimes be a little out of my comfort zone, but thats always a good place to be, right? I have a specific and I should imagine very easy thing i need to set up. I'm making a website for a band who play a lot of live shows. I wonder if anyone has the best solution to make a list of their shows that automatically deletes a show once it's date has passed. You know the way, say, the Myspace live list works. I don't need any fancy calender graphics or anything like that. Just a self-updating list.

View Replies !
How To Write IE Specific
I have a small peice of code that i want to append as a attribute to a html element ONLY if the users browser is IE. I know how to detect the browser in JS, however i have yet to find an easy way to detect IE in php Code:

View Replies !
Specific Fields In FFD
I have a flat file database with data like the following: Code:

01|Greg|5
02|John|1
02|John|5
03|Mary|3
04|Matt|2
02|John|3

with the form being ID|Name|Hours. How can I extract just, for instance, John's hours and show that he has worked 9 hours total (1 + 5 + 3)? I have found from various sites how to display a single person's information.

View Replies !
$http_referrer Allow Access From Specific URL Only
I am trying to figure out the correct PHP coding to put on
a page that will only allow access if referred by a specific
URL or URLs (link from another site) and if they are not c
oming from that URL(s) then they are redirected to somewhere else like yahoo, etc.

View Replies !
Targeting Specific Frame
Hi I have used frames a while ago but not since going with PHP Is there anything special with frames and PHP I seem to be having trouble with targeting a different frame

I have 3 frameset "top", "side" and "main"

in the side frame I grab some info from a database and create a simple anchor tag with some variables loaded into into and I want to when the anchor tag is clicked have the information loaded into the "main" frame.

the link does not appear to be created correctly here is the actual code for the anchor tag.

View Replies !
Search Question - How To Get Specific
I have a search script on my site now using LIKE with wildcards on either side. The problem is that if someone searches on "APHS" which is a type of film, anything with the word photogrAPHS comes up too.

Obviously because the pattern matches. However if I take off the wildcards it wont find it because its not the first word of the string.

Anyone have anything thoughts on how to go about that? So that if you search on APHS is searches the whole field to see if there is a word match?

View Replies !
Destroying A Specific Session?
how to destroy the server-side data associated with a session *after* session_write_close() has been called?

session_destroy() won't work after session_write_close() because there is no currently-initialized session, and the manual doesn't indicate that there's any way of telling session_destroy() to destroy the data associated with a specific sessionid, which is the only route I could think of to make this work.

Calling session_start() to initialize the session a second time (in preparation for a call to session_destroy()) isn't an option, because headers have already been sent by the script.

View Replies !
Find A Specific Value In An Array
What I want to do is compare a value against an array and perform a specified action if the value is in the array. Specifically, I want to preselect an option in a list based on whether or not the option id is in a field (a 'set' column) of a specific entry in a db. My code so far is: PHP Code:

View Replies !
Getting Data From A Specific Row With Mysql
I'm makin a member's area on my site with sessions, as they log in correctly the username is stored as $_SESSION['user']

what I can't work out, is how to access my table and extract data from just the row that has that username, eg

SELECT * FROM table WHERE username=$_SESSION['user']

as I'm trying to make the users be able to edit profile, upload pics etc... any idea what I'm doing wrong?

View Replies !
Upload To Specific Folder
I am working in a directory:

/www/domain/
and made the directory
/www/domain/images/

What I need is for people to be able to upload images to this folder from a form on upload.php They should click browse and select their file to upload then press the "Upload" button. On the next page I want to display the .jpg or .gif that they uploaded.

What is the coding for uploading that should go into the first upload.php script and the coding for the upload_result.php script. I think that the result could be:

echo "<img src="images/$file">"; where $file = the image they uploaded. But I cannot seem to figure out what the first code should be.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved