chrometweaks.org

How to connect database with php code on the iPage web host?

Click Here To View All Answers...


Got a question, hope someone can answer... How to connect database with php code on the iPage web host? Many thanks for any answer. Second question.. Here is my dillema,.

I am selling books on my site.

Here.

And as a result I have added a number of new fields. One of these is the books ISBN number..

The problem is that an isbn number can be in many different forms, ie.

1-2345-6789-0.

Or.

1 2345 6789 0.

Or.

1234567890.

And on the iPage site I have entered them like this.

1 2345 6789 0.

So I need to be able to strip down, both the one the user inputs and the ones I have entered, the spaces and - (dashes).

Does anyone have an idea on how would be best to go about this..

Btw the position of the dashes/spaces changes also..

Comments (48)

Good question... I dunno what is the answer. I'll do some poking around and get back to you if I bump into an good answer. You should email the people at iPage as they probably can answer it..

Comment #1

What is your ultimate goal of display? if you are submitting items to search engines by field, the isbn will / should be read by the respective sites as a string.

To see what I mean, go type this in (# came from your site) a google search box.

Without quotes, etc.,.

Isbn 0 09 460320 0.

I do see the problem with yahoo, as they do not want any spaces.

This post has been edited by.

Mibble.

: 09 September 2004, 12:19..

Comment #2

I think you may have misunderstood, what I am referring to is on the iPage site itself, within the products search box..

I want someone who arrives at the iPage site and searches for an isbn number to find the book (assuming we have it) regardless of how they input the number,.

Be it 1234567890.

Or.

12-34565-890.

Etc......

Comment #3

Thanks gary,.

So I could use something like this then......

<?php.

Str_replace(" ", "", $text);.

?>.

And adapt this so that it will replace spaces and dashes with nothing?.

Where would I look to make these changes, ie where is the comparison actually done for the search..

Comment #4

Here is my dillema,.

I am selling books on my site.

Here.

And as a result I have added a number of new fields. One of these is the books ISBN number..

The problem is that an isbn number can be in many different forms, ie.

1-2345-6789-0.

Or.

1 2345 6789 0.

Or.

1234567890.

And on the iPage site I have entered them like this.

1 2345 6789 0.

So I need to be able to strip down, both the one the user inputs and the ones I have entered, the spaces and - (dashes).

Does anyone have an idea on how would be best to go about this..

Btw the position of the dashes/spaces changes also..

Comment #5

Is there a way in php of "stripping" certain characters?.

Because I'm thinking this may be the way to go..

Comment #6


This question was taken from a support group/message board and re-posted here so others can learn from it.