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.





PHP/MySql Jump Script


I have also read in a affiliate forum (quote below)that putting &afsrc=1 at the end of a link will help click through, how might this also be implemented? "Recently, I put the &afsrc=1 on all my links across my largest sites. Damned if sales have not increased by 10-20% since then. (it has been about 2 weeks at about 13000 clicks a day)"

<?php
$link = mysql_connect ("localhost", "user", "pass");
mysql_select_db ("datebase");
$result = mysql_query ("SELECT link FROM id WHERE number=$locn");
$row = mysql_fetch_array($result);
header("Location: " . $row["link"]);
mysql_close ($link);
?>




View Complete Forum Thread with Replies

Related Forum Messages:
Unable To Jump To Row 0 On MySQL Result
im making a login program, and i get this error.

"Warning: Unable to jump to row 0 on MySQL result index 2 in /var/www/html/login.php on line 16"

Code:

View Replies !
Warning: Mysql_result() [function.mysql-result]: Unable To Jump To Row 0
i want to grab the value of a sql entry. but the thing is, sometimes this value is <NULL>. i thought, no biggy, i'll just have an if statement:

if (is_numeric(mysql_result($query, 0))) {
//do something
} else {
//do something else using mysql_result($category_id_query, 0);
}

however, this doe not work. i get this error: Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 3 is there a way to check to see if mysql_result() is <NULL> without throwing an error.

View Replies !
Warning: Mysql_result(): Unable To Jump To Row 0 On MySQL Result Index
i got this message:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 6 in c:inetpubwwwrootDreamWeaverSiteswebadminwa.php on line 2296

for these lines of code:

$sql11="delete from Booking where Booking_Id='$Booking_Id'";
$result11=mysql_query($sql11);.

View Replies !
Using Jump Menu
I am using a jump menu to select multiple drop down boxes in a form which are related to the choice you make in the first drop down box.  The problem is that the page reloads and everything before this tag is cleared.  I want to be able to repost the data.  I know that I need to use sessions in my code but I dont know exactly how to use them for this case. Code:

View Replies !
Jump Frame?
I want to make a jump frame (i think is the name), when people click in an image or video, appears a frame in the top (or left), but i want to put an id for each video and image.

There are a simple and better way, but i don´t know how to do, where we can put only the link and it redirects with the frame in php (out.php) like this one (this is an adult link, not spam, only is an example what i want): Code:

View Replies !
JUMP Out Of The Script
"mysql_connect establishes a connection for the duration of the script that access the db. Once the script has finished executing it closes the connection. The only time you need to close the connection manually is if you jump out of the script for any reason. "

http://www.webmasterworld.com/forum88/903.htm

What does he mean by jump out? I used header redirection, is this "jump out", but after header redirection, I always added exit;, does it mean that I need to close the connection.

View Replies !
Unable To Jump To Row
I have a tariff which is atm 44 rows with 15 columns of numbers. Now i am trying to pull as individual price from the tariff based on user input: Code:

View Replies !
Unable To Jump Row 0
I am getting the following error:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 2 in /home/content/i/n/n/**/html/tracker/connect.php on line 35

Here is my coding from line 34 on down. Code:

View Replies !
Jump Menu
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="www.site1.com">google</option>
<option value="www.site2.com">metu</option>
<option value="www.site3.com">mynet</option>
<option value="www.site4.com">asa</option>
</select>

above code ; i want to get the selected value and post as named $url into a php code.
How can i call the selected value?

View Replies !
Site Jump During Submission
1)I'am collecting form data on my server from a HTML form.

The next steps Iam trying to figure out is:

2) I want to then go to another site (payment site)

3) then back to my site.

4) extract original data gathered from step 1

I know the simple method would be to go to pay site first then to my site. However I would like my form first! I also do not want to write the data into mysql in step 1. Not until step 4.

View Replies !
Jump From One Part Of The Script To Another
Is it possible to jump from one part of the script to another part? Meaning the script would jump from line 7 to line 20, ignoring lines 8-19.

View Replies !
Header('Location:') Jump Ignored?
I'm seeing a problem that has me flummoxed. The only thing I can
think of is that I'm violating some rule I don't know about.

I have some code that does some processing and then does a
header('Location: ...) jump to page A on success or falls through to
the jump to page B. This is the code:

if ( mysql_query( 'LOCK TABLES tableX WRITE', $link ) )
{
mysql_query( $q, $link ) ; // store the record
$ID = mysql_insert_id( $link ) ; // save the new id

if ( mysql_affected_rows($link) == 1 )
{
unlock_tables() ;
$_SESSION['ErrMsg'] = 'New ID is ' . $ID ;
header( 'Location: PageA.php' ) ;
$_SESSION['ErrMsg'] .= ' Error: ignored jump' ;
}
else // the store failed
{ error handling }
}
// second chance (for debugging) to do the right thing
header( 'Location: PageA.php' ) ;
$_SESSION['ErrMsg'] .= ' and it ignored it AGAIN!' ;

// and we shouldn't get here at all -- but we do!
header( 'Location: PageB.php ) ;


Unfortunately, as I know from the telltales I stuff into session, the
store works but the interpreter ignores both header calls that would
jump to A and finally jumps to B instead. Unless I'm more tired than
I'm aware, or more ignorant, this doesn't make sense.

View Replies !
Jump To Section Of Same Page
PHP Group,

How can I in PHP, based on a result, move the cursor to a certain location
on the page? I want the same result as Anchor tags in HTML. I want to go to
a certain section of the same page based on a return result in PHP. What
this is for is an order forms page - when a user fills out a section
incorrectly, I want the page to display at that location in the form after
the user presses a submit button.



View Replies !
Jump Out Of A Multidimensional Array?
trying to get out of an array dynamically.

$transport = array('foot', 'bike', 'car', array('test1', 'test2'));
i'm in test2( $transport[3][1] ), how do I go into $transport[3]? Is there a function capable of doing this?

View Replies !
Jump Menu Selected Value
I have a set of 2 menus where the values of the 2nd are dependent on the value selected in the first. Yes, I will (eventually) convert this to a javascript process, but for now I am content reloading the page.

I have created a jumpmenu that reloads the page with the state passed in the url (ie. community.php?state=NY). This determines the values displayed in a second (dependent) menu which then lists the counties available for that state. Code:

View Replies !
Jump To Html Page
I am a php newbe and I am trying to figure out how to simply display an existing html page from my php script. Here is the code I use but I get the normal "output started" errors.

$sql = "INSERT INTO author SET
firstname='$name1',
lastname='$name2',
workphone='$workphone',
email='$email',
loginid='$loginid',
password='$password'";
if (@mysql_query($sql)) {
header("Location: formSubmit.htm"); <--------HERE

View Replies !
Dynamic Jump Menu
I'm looking to create a dynamic jump menu/list menu that will enable me to navigate to a particular record by selecting a value from the list, however the list is dynamically generated from the recordset. Code:

View Replies !
Header - Jump Menu Does Nothing In IE
I have a php header and php footer that are being called into my content pages. In the php header, I have a jump to menu system. The jump to menu works great in Firefox, however, the jump menu does nothing in IE. Have any of you experienced problems with jump to menues in php headers and whatnot?

View Replies !
Jump Script And Wordpress
I created a very simple jump script, and then edited a page on my blog so the links use the jump script links. I followed a template, and triple checked all the code, so I am sure that part is right. My question is, where do I put the actual .php file so the links in the jump script actually pick up the code and go where they are supposed to go?

I tried a variety of folders (public_html, themes folder, actual theme folder, etc.), but none made the script work. unless I am (quite possibly) missing something else?

View Replies !
Pagination :: Unable To Jump To Row 0
I am running a script to find the "Previous" and "Next" records, the problem is when I get to record 1 I get the error below, same with when I reach the last record in the db.
PHP Code:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 18

Here is the script running it, do I need to add to the query? or how can I use IF/ELSE?PHP Code:

<?php
$id = $_GET['id'];
// Retrieve your record according to id
// Display Record
// Links to Previous Records
$query = "SELECT id FROM jokes WHERE category = '$category' AND id < $id ORDER BY id DESC LIMIT 1" ; // For Previous
$result = mysql_query($query) ;
..........

View Replies !
Jump To Letter In Paginated Results
I'm on a project that has paginated results coming from MySQL, say ten records on a page. Let's say that the results contain a song title. What would be the best method for me to write a script that could take a user to whichever page has the first song title starting with B?

Basically, the client wants a list of letters at the bottom that take the user to the page that records beginning with the selected letter begin on. Advice? Am I going to have to loop through the results and count the positions of the letters, and then calculate which page that position would be on?

View Replies !
Jump Menu Call Page
Is it possible to use a jump menu to call a page within a page? To be clearer. I can place an " include ('whatever.php'); " within my page which is fine. But i would like this include to be a variable set by the options within a jump menu. So when I select from the menu the include will swap from its default to the newly selected one. Am I making sense?

View Replies !
How To Create A Jump-menu Using Dreamweaver?
I have 50 names and links I need to show up alphabetically in a jump-menu. I'm pretty green with php and databases. Is there a quick and easy way to accomplish this? I know how to create a jump-menu using Dreamweaver, but how would I set it to read the text file.

View Replies !
Possible To Abort A Script And Jump To The Next Block Of Code?
I was wondering if it is possible to create a button/link that would let a user stop the execution of that piece of code and then resume execution starting with the next 'block' of code. 

View Replies !
Script That Is A Bit Like A Jump Menu But Without The Pull Down List.
I am looking for a script that is a bit like a jump menu but without the pull down list. I want users to be able to enter a post code (4 digits) and then be redirected to a web page based on that post code as each web page is different per code.

the jump menu provided in dreamweaver is almost there but as there are thousands of codes it is impractical to have them drop down.

View Replies !
How I Can Make A List That Acts Like A Html Jump Menu?
how I can make a list that acts like a html jump menu (for a regular list I have to use a "Go" button in order to achieve the desired behaviour and jump menus I cannot use because they work only with links to other pages).

For example,I want such a list filled with questions from my db and when I select one I want to see its possible answers; the page stays the same, only its data differs based on the selection. Or you can have a look at such a jump menu on this website, the one with options for geting to various sections of the forum.

View Replies !
Header Problem - Insert The Info Below And Then Jump Back To A Page.
i want to insert the info below and then jump back to a page. Here is insert and the header statement: PHP Code:

View Replies !
PHP And MySQL: How To Properly Call A Stored Procedure With Output Parameters From PHP - Mysql, Mysqli, Or PDO
I am currently using PHP 5 and MySQL 5, both on Fedora Core 5. I am
unable to call a MySQL stored procedure that returns output parameters
using mysql, mysqli, or PDO. I'm having a hell of a time with it...

The following comes from phpinfo():
PHP Version: 5.1.2
mysql Client API version: 5.0.18
mysqli Client API version: 5.0.18
PDO Driver for MySQL, client library version: 5.0.18

MySQL version, from running SELECT version(); = 5.0.18

Here's the procedure I've created in MySQL:
CREATE PROCEDURE testproc(OUT p_testvar varchar(50)) BEGIN SET
p_testvar = 'HELLO WORLD!' END
[color=blue]
>From the MySQL Command Line, I can do the following:[/color]
mysql> call testproc(@a);
Query OK, 0 rows affected (0.00 sec)

mysql> select @a;
+--------------+
| @a |
+--------------+
| HELLO WORLD! |
+--------------+
1 row in set (0.00 sec)

View Replies !
Warning: Mysql_connect() [function.mysql-connect]: Lost Connection To MySQL Server
I've set up a test server on an Ubuntu system. I installed and configured Apache, PHP and MySQL however, whenever I try to connect to a MySQL database I get this error:
PHP Code:

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/index.php on line 8
Lost connection to MySQL server at 'reading initial communication packet', system error: 111

Does anyone know what is causing this and how I can solve the problem?

View Replies !
Mysql_data_seek() [function.mysql-data-seek]: Offset 0 Is Invalid For MySQL Resu
mysql_data_seek() [function.mysql-data-seek]: Offset 0 is invalid for MySQL result index 8 (or the query data is unbuffered) in /home/realfina/public_html/ec/checkout/functions.php on line 457

And how do I fix it?

View Replies !
Create A Multi Table Database In MySQL And Write To And Retrieve Information Using MySQL.
I am trying to create a multi table database in MySQL and write to and retrieve information using MySQL. I am able to insert and call data easily enough going into one table, but I am having problems with connecting tables and using the idea of normalization.

I am starting simple with an online registration for alumni of an association. My first table in a database is called alumni and it stores there e-mail address, first and last name and year of graduation. Code:

View Replies !
MySQL Error - Supplied Argument Is Not A Valid MySQL-Link Resource
I am getting the error

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/server7/public_html/71/arranholloway/database4.php on line 7

I tested my code on local computer and there were no problems, the error message only appeared when I loaded it onto my web hosters server. I'm new to PHP so its probably something simple but any help would be appreciated.

View Replies !
Warning: Mysql_connect() [function.mysql-connect]: Unknown MySQL Server Host 'sql1bravehostcom'
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'sql1bravehostcom' (1) in /misc/13/000/126/295/2/user/web/jeppers90.com/includes/fiction_mysql.inc.php on line 11
Cannot connect to server

this message is what i get when i try to upload it to a webserver..things i have done set up database put in correct information from the database in to my php form. what ever i try i can't seem to set it up .

View Replies !
Connection With MySQL. Navicat - CANNOT CONNECT TO MYSQL SERVER ON LOCALHOST
I am new in PHP & MYSQL. I installed PHP & MYSQL properly. To easy
operate for MYSQL I installed Navicat and it installed properly. But
when I am going to test the connection between MYSQL & Navicate the
error message showing CANNOT CONNECT TO MYSQL SERVER ON LOCALHOST
(10022) it should mention that my connection name = localhost, Ip =
localhost,port = 3306 , user name = root in Navicat.


View Replies !
PHP Saying Error In Mysql Syntax, But Written My Mysql Query Browser!
I have a basic db that I access with MySQL query browser. Everything
seems fine to me but I am using this db as part of a php shopping
basket and when I try to add an item I get:

Notice: Query failed: You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near '>function.extract]: First argument should be an
array in functions.inc.php on line 31
Notice: Undefined variable: price in functions.inc.php on line 36
Notice: Undefined variable: price in functions.inc.php on line 39
Notice: Undefined variable: total in unctions.inc.php on line 39

I'm assuming the last three are caused by this problem as price should
be passed to the cart, and total is worked out using it. However
although I know mySQL code it was the MySQL query browser that
actually generated the code and I cannot see a way to view or debug
the code.

The db has one table in it which is made up of id, name, subname,
desc, and price.

The code in the php file that is being referred to is:

View Replies !
Can't Connect To Local MySQL Server Through Socket '/tmp/mysql.sock' (2)
this is a new error message I've not encountered before. looking at the phpinfo data, it says mysql.max_links is "unlimited" I'm using mysql_connect (vs pconnect). When I try inserting mysql_close() in my functions, I get the :

Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

View Replies !
MySQL Pro Certified Server Versus MySQL Community Edition
Does anyone have any experience with this? I'm trying to see if the service provided with the "MySQL Network with MySQL Pro Certified Server" version is worth the costs involved.

I'm making a real estate website that's basically going to be a listing service. You can do searches on the listings for free, and it costs to add your listing. Our listings are only going to be active for 30 days, and we really don't expect to have more than maybe a thousand or so listings at a time tops.

I'm just wondering if this is something that should be manageable for me, even though I really don't have any prior DBA experience. I've played around with phpMyAdmin for a bit, so I know how to backup/replace/repair/etc., and am just wondering if this is enough. Any thoughts?

View Replies !
Warning: Mysql_connect(): Can't Connect To Local MySQL Server Through Socket '/tmp/mysql.sock' (2) In /home/custcare/dbconn.inc On Line 2
It's really strange. I downloaded the latest 4.0.16 RPM from mysql.com
and installed it to my Fedora system, and did *not* do anything else
(Actually I am completely new to mysql).

I wrote a test php script to test mysql (ftp_connect('localhost',
'root');), but got the following error:

Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2) in /home/custcare/dbconn.inc on line 2

I ran phpBB2 installation page, got the same error. But it can connect
to mysql using my computer name.

View Replies !
Automatic Scheduled MySQL Backup (MySQL Dump)
Is it possible to configure a UNIX/LINUX server to do a MySQL Dump for a database on an automatic schedule and then to email the dump file to me (the administrator)?

I want to be able to have my database automatically backed up every week and emailed to me for storage purposes without any action on my part.

View Replies !
PHP/MySQL: Using PHP To Probe MySQL Db And Send An Email Automatically
Let's say you have a login feature on your site... and a user forgets their password which is stored along side their email address in a MySQL database. Is it possible to use PHP to automatically send the password to that email address upon request? If so, please provide a detailed solution. If not, can Java be used in some way to accomplish this?

View Replies !
Mysql Connection - Connect To A Remote Mysql Database
I have problems getting my php webpage to connect to a remote mysql database. I can connect using the same name and password from the command prompt using mysql. I also have my own sql database on this computer that the php website can access.

View Replies !
--with-mysql ? Php-4.4.2 With Mysql Install In Special Directory
I'm trying to link php-4.4.2 with mysql install in special directory,
like /usr/newsystem/mysql, but whatever options I try, php always gets
linked to version in /usr/local/lib. I've tried several options:

--with-mysql=/usr/newsystem/mysql
--with-mysql-dir=/usr/newsystem/mysql
--with-mysql-lib=/usr/newsystem/mysql
--with-mysql-lib-dir=/usr/newsystem/mysql

....but none of them work, CLI is always build against /usr/local/lib/
libraries.

View Replies !
Create A Sequence In MySQL, With Mysql Variable?
This might be fairly easy to do and I think I've seen the code before,
but I haven't seen many good examples of this. Of course Pear::DB
probably uses this code in some of its API, probably in dealing with
auto-increment indexes and prepared statements.

Maybe I'm off base here, but I'm looking for something like this:
(psuedo-code)
Of course the seq table only needs 1 row holding id, which is
updated.
select id from tbl;
// get result resouce and do fetch, store value in $myid
set @myvar = $myid + 1; // can php send to MySQL with a query? (
never seen this )
update myseq set id=@myvar // send this statement through in a
update/query

// for use in PHP code
$newSeqVal = $myid +1

View Replies !
And Mysql - Connect Remotely To A Mysql Database.
I am trying to connect remotely to a mysql database.

here is the code:

<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_myDB = "http://db195.perfora.net";
$database_myDB = "dbname";
$username_myDB = "username";
$password_myDB = "password";
$myDB = mysql_pconnect($hostname_myDB, $username_myDB, $password_myDB)
or trigger_error(mysql_error(),E_USER_ERROR);
?>

here is the error:

Warning: mysql_pconnect(): Unknown MySQL Server Host 'db195.perfora.net'
(1) in /oldhome/WWW/wingsofthedawn.org/htdocs/final/Connections/myDB.php
on line 9

View Replies !
Copy And Paste On MySQL To MySQL Database
Would there be any issues if i literary Copy and Paste a mysql db from one server to another mysql db server? When i say "copy and paste" is just like tranferring one word doc from one pc to another pc.

I tried the copy and paste already and the new server had recognize the DB i had pasted. I just want to confirm if there would be issues doing it so.. Or should i use Mysql.com Migration toolkit?

View Replies !
Mysql Update - Grab The Value Count From Mysql
I'm trying to grab the value count from mysql and add one to it. This is very simple, but I"m still completely lost! here is the code:

require("connect.php");

$result = mysql_query("SELECT fav_count FROM favs WHERE page_id = $page");
$result++;
mysql_query("UPDATE favs SET fav_count = $result WHERE page_id = $page");

echo "Thank you for telling us you like this!<br />Please wait...";
echo "<META HTTP-EQUIV=Refresh CONTENT="2; URL=link.php">";
Any help is greatly appreciated!

View Replies !
Php/Mysql- Uploading Mysql Database
I've set up a basic database using Mysql (just creating a web blog I followed a tutorial) and then started writing the php code for interacting with the database. how do I put the Mysql database onto the the web server where I have server space (the server I use is just some company that I pay €100 a year for). I need the php file to get the data from the Mysql database...

View Replies !
Problem Getting PHP To Recognize MySQL, Using PHP 4.3.7 And MySQL 4.0.20
I have both PHP 4.0( RPM) installed and MySQL 4.0.20 installed with the
mysqld daemon up and running. But when I look at the output of phpinfo() ,
I do not see it there, which is worrisome and so I tried to recompile PHP
and do ./configure with the --with-mysql=path but I don't really know
where my mysql's header files should be , is there any way to find that
out by using any of the mysql commands?

I did try to do ./configure for PHP4 without any parameters and when I
looked at the output, I do see that PHP seems to recognize that mySQL is
there :

....
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock
checking for inline... (cached) inline
.....

Hence, why is that when I do phpinfo() , mySQL still doesn't show up?

I suspect that mysql isn't working correctly with php, because if I use
the mysql_connect() function in my php, I get the error "Fatal error: Call
to undefined function: mysql_connect() "
and yet it DOES seem like PHP recognizes mysql is there.

That "unable to recognize mysql_connect function" error comes up after
installing PHP using ./configure with or without any parameters.

View Replies !
Seeking Resources On Mysql, Not Mysql.com
I'm looking for some resources that can aid me in getting deeper into
php/mysql.
I am presently looking at a syntax that lets me check a mysql row for one
particular value, using sql.
Then I look for a sql based solution to get a column name based on the above
value.
Last I need to update that row, actually NULL that particular field in that
particular row.

I've been reading mysql.com the function list all afternoon, nothing found
that might make it able for me to write those statements in question.
So now I better expand and seek new sources, google.com didn't give me much
while searching the groups.

View Replies !
Migrate Old Mysql DB To New Mysql Server
I am trying to migrate our old mysql DB to another new mysql server using AB: MySQL Migration Tool. The migration has some problem.

One of the tables from the old DB had a column defined Datatype as DATE. However, when I do migration. The migration informs me that " The following error occured while transfering data from log Cannot convert value '0000-00-00' from column 13 to TIMESTAMP."

I believe the migration forces to convert the datatype into timestamp. The work around i can do on this is to change the datatype of the column on the old DB into Timestamp. However, I don't want that. I want to retain the DATE datatype.

View Replies !
Mysql 3.5 And Mysql 4.1 Data Insert
I am not able to insert data in mysql 4.1 by using same php script i used for mysql 3.5 . only id field and date field which are not VARCHAR get inserted but not VARCHAR
PLease help here is my insert statement Code:

View Replies !
Socket '/var/db/mysql/mysql.sock' (2)
I'm just uploading a site to a new hosting company, and i get this error
socket '/var/db/mysql/mysql.sock' (2)

I know my script is sound as it runs fine local and on my usual server, from googling it, it appears that it may be an problem server side, can anyone help?

View Replies !

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