/    Sign up×
Community /Pin to ProfileBookmark

No f$#$%& idea with this PHP

[COLOR=blue] I have get lost in some point and I do not know what’s wrong now:
I have developed a site that search a MySQL database by PHP, if you access the following adress
[URL]http://www.inmobiliariapantoja.com/main.html[/URL]
you will find a page that contains a search engine on the top. If you make a search without any criteria (just pressing over the magnifier lens), it should gives you back all the items inside the database (No criteria to choose = all given)
It will open a new page “resultados.html” with 115 results ordered in groups of 10, there is of course a link that allows you to go to the next 10 results.
THIS LINK DOESN’T WORK
But if in this new page “resultados.html” you repeat the same query (Just pressing again the magnifier) it will give you the same result and also the possibilitie to browse between them.
Why it happens if they aparently equal??

The codes:

For main:
[URL=http://www.inmobiliariapantoja.com/main.txt]The code of the first page with the search engine on the top[/URL]

For buscador:
[URL=http://www.inmobiliariapantoja.com/buscador.txt]This site is embeded in an iframe inside the page “resultados.html” the one that show the results [/URL]

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@DaiWelshJun 10.2003 — If you look at the two urls of the pages (right click - properties in IE). The one which works is

http://www.inmobiliariapantoja.com/resultados.html?varid=?envio1=-1?envio2=-1?envio3=-1?envio4=-1?envio5=-1?envio6=-1

The one that fails is

http://www.inmobiliariapantoja.com/resultados.html?envio1=-1?envio2=-1?envio3=-1?envio4=-1?envio5=-1?envio6=-1

Firstly, these are actually BOTH wrong. You need to change your javascript to use & instead of ? to add the extra parameters onto the url as there should only be one ? in a url.

Assuming that does not fix it anyway, the likely reason that the second one works is that a parameter called 'varid' is being passed in this one and not in the first, so either add this parameter to the first page (where the javascript url gets built) or change your code to handle it not being there.

HTH,

Dai
×

Success!

Help @kindra spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...