StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 11-06-2008, 09:11 AM
mds840 mds840 is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Channahon, Il
Posts: 35
Default Issues with PHP mySQL and Lifestyle theme

Its hard to explain, so I will do my best.

I have a mySQL DB that I have populated with a contact list, on a WP page I run some PHP code to extract the data using either a form or I have also tried to just hard code the search criteria.

When I put the PHP code in using the Write > Form, when the list displays it displays 2 blank lines for each positive search result before it displays the actual data.

If I hard code the page: ie page_find.php after the search results are compiled the page will redirect to the Home Page.

I have basically the same thing working on another site using the Revolution City theme and it works fine.

Any ideas?
  #2  
Old 11-06-2008, 06:47 PM
Paul Paul is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Edinburgh, UK
Posts: 1,499
Default Re: Issues with PHP mySQL and Lifestyle theme

Can you post a link so we can see what's happening?
__________________
Some of the websites I've built with StudioPress:
<a href="http://www.horseracing.fm">Horse Racing</a> | <a href="http://wedding-blog.net">Wedding Blog</a> | <a href="http://www.weddingtrix.com">Wedding Planning Guide</a> | <a href="http://advance.to">Search Engine Marketing</a> | <a href="http://www.automateyourprofits.com">Betting Software</a> | <a href="http://www.bettingbots.com">Betting Bots</a> | <a href="http://www.pokerclubscotland.com">Poker Club Scotland</a>
  #3  
Old 11-06-2008, 08:09 PM
mds840 mds840 is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Channahon, Il
Posts: 35
Default Re: Issues with PHP mySQL and Lifestyle theme

It is marginally not work safe depending on the rules, there are no nude pics or pics of any people, just links that may not be safe to click

Here is the link to the part that is going back to the home page after making the criteria choices:
http://www.mysexyrep.dreamhosters.com/find-advisor/

Here is the link to where it is putting in extra spaces, I added a print test to verify where it is where the extra space is coming from.
http://www.mysexyrep.dreamhosters.com/bp/
  #4  
Old 11-06-2008, 08:18 PM
Paul Paul is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Edinburgh, UK
Posts: 1,499
Default Re: Issues with PHP mySQL and Lifestyle theme

The reason it's redirecting to your homepage is because that's where the form is pointing...

<form action="/index.php" method="POST">

For the spaces you would really need to check the code in the script you're using - can't really help with that.
__________________
Some of the websites I've built with StudioPress:
<a href="http://www.horseracing.fm">Horse Racing</a> | <a href="http://wedding-blog.net">Wedding Blog</a> | <a href="http://www.weddingtrix.com">Wedding Planning Guide</a> | <a href="http://advance.to">Search Engine Marketing</a> | <a href="http://www.automateyourprofits.com">Betting Software</a> | <a href="http://www.bettingbots.com">Betting Bots</a> | <a href="http://www.pokerclubscotland.com">Poker Club Scotland</a>
  #5  
Old 11-06-2008, 08:23 PM
mds840 mds840 is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Channahon, Il
Posts: 35
Default Re: Issues with PHP mySQL and Lifestyle theme

This is my <Form> code:

Code:
<form action="<?= $PHP_SELF ?>" method="POST">
  #6  
Old 11-06-2008, 08:26 PM
Paul Paul is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Edinburgh, UK
Posts: 1,499
Default Re: Issues with PHP mySQL and Lifestyle theme

You probably need to change <?= $PHP_SELF ?> so that it's pointing straight to the script you're using.
__________________
Some of the websites I've built with StudioPress:
<a href="http://www.horseracing.fm">Horse Racing</a> | <a href="http://wedding-blog.net">Wedding Blog</a> | <a href="http://www.weddingtrix.com">Wedding Planning Guide</a> | <a href="http://advance.to">Search Engine Marketing</a> | <a href="http://www.automateyourprofits.com">Betting Software</a> | <a href="http://www.bettingbots.com">Betting Bots</a> | <a href="http://www.pokerclubscotland.com">Poker Club Scotland</a>
  #7  
Old 11-06-2008, 08:32 PM
mds840 mds840 is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Channahon, Il
Posts: 35
Default Re: Issues with PHP mySQL and Lifestyle theme

Just weird that the same code works fine here:

http://www.bedroomdivas.com/find-a-diva/
  #8  
Old 11-06-2008, 08:46 PM
Paul Paul is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Edinburgh, UK
Posts: 1,499
Default Re: Issues with PHP mySQL and Lifestyle theme

When you view the source of that page it's slightly different...

<form action="" method="POST">

Strange, because without anything in there I can't see how the script knows what to do.

Sorry, I'm not a programmer and can't offer much help with this.
__________________
Some of the websites I've built with StudioPress:
<a href="http://www.horseracing.fm">Horse Racing</a> | <a href="http://wedding-blog.net">Wedding Blog</a> | <a href="http://www.weddingtrix.com">Wedding Planning Guide</a> | <a href="http://advance.to">Search Engine Marketing</a> | <a href="http://www.automateyourprofits.com">Betting Software</a> | <a href="http://www.bettingbots.com">Betting Bots</a> | <a href="http://www.pokerclubscotland.com">Poker Club Scotland</a>
  #9  
Old 11-06-2008, 09:14 PM
mds840 mds840 is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Channahon, Il
Posts: 35
Default Re: Issues with PHP mySQL and Lifestyle theme

You may not be a programmer but you fixed the issue. You saw what I didn't see, that was it, I took the php statement out and just put in the "" and it works like a champ.

Thanks
  #10  
Old 11-06-2008, 09:28 PM
Paul Paul is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Edinburgh, UK
Posts: 1,499
Default Re: Issues with PHP mySQL and Lifestyle theme

Ah, good stuff :)

If you take a look at the part of the script that generates the html for the search results you might be able to spot what's inserting the extra spaces too.
__________________
Some of the websites I've built with StudioPress:
<a href="http://www.horseracing.fm">Horse Racing</a> | <a href="http://wedding-blog.net">Wedding Blog</a> | <a href="http://www.weddingtrix.com">Wedding Planning Guide</a> | <a href="http://advance.to">Search Engine Marketing</a> | <a href="http://www.automateyourprofits.com">Betting Software</a> | <a href="http://www.bettingbots.com">Betting Bots</a> | <a href="http://www.pokerclubscotland.com">Poker Club Scotland</a>
  #11  
Old 11-06-2008, 09:30 PM
mds840 mds840 is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Channahon, Il
Posts: 35
Default Re: Issues with PHP mySQL and Lifestyle theme

Thanks for the help and the advice on what to look for to clean up the other issue, I will try that. Thanks again, that was 2 weeks of headaches you solved for me.
  #12  
Old 11-06-2008, 09:34 PM
Paul Paul is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Location: Edinburgh, UK
Posts: 1,499
Default Re: Issues with PHP mySQL and Lifestyle theme

Good luck with the other thing - hope you get it fixed!
__________________
Some of the websites I've built with StudioPress:
<a href="http://www.horseracing.fm">Horse Racing</a> | <a href="http://wedding-blog.net">Wedding Blog</a> | <a href="http://www.weddingtrix.com">Wedding Planning Guide</a> | <a href="http://advance.to">Search Engine Marketing</a> | <a href="http://www.automateyourprofits.com">Betting Software</a> | <a href="http://www.bettingbots.com">Betting Bots</a> | <a href="http://www.pokerclubscotland.com">Poker Club Scotland</a>
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lifestyle Theme Options issues phigney General Discussion 1 08-23-2010 06:27 AM
A few issues with lifestyle jmar General Discussion 3 12-02-2009 10:07 AM


All times are GMT -5. The time now is 06:32 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.