PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Graphisme & Infographie > macromedia.dreamweaver > gathering information from stored URL
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
gathering information from stored URL

Réponse
 
LinkBack Outils de la discussion
Vieux 10/06/2008, 04h00   #1
jsteinmann
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut gathering information from stored URL

I am setting up email alerts for people where they can select a variety of
options, and if criteria matches all the options they choose, they get an email
letting them know they have a match to view.

Since I use a get form for the search results page, I figured that would be a
good way to store the email alerts options as well. I am able to store the URL
string of parameters very nicely using $url=$_SERVER['QUERY_STRING']; echo
$url; and saving that in the database. However, I'm not sure how I can extract
data from that string other then using the $_get .... but I don't have an
option of using the address url since it will be looping though all the email
alerts data finding matches and spitting out emails.

Any ideas on how to do this?

  Réponse avec citation
Vieux 10/06/2008, 04h19   #2
jsteinmann
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: gathering information from stored URL

.... and if I can loop through an entire table of stored url query strings, and
extract that data and match it against stored data that matches those email
alert options, would it be better to just store each variable in individual
columns as an array in the database, and then implode those arrays into a
format where it can be compared against the data it needs to match? If so, how
can I store arrays in the database and extract them successfully. I didn't
understand serialize and how to work with that, and didnt know if there was
another way.

  Réponse avec citation
Vieux 10/06/2008, 15h47   #3
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: gathering information from stored URL

..oO(jsteinmann)

>I am setting up email alerts for people where they can select a variety of
>options, and if criteria matches all the options they choose, they get an email
>letting them know they have a match to view.
>
> Since I use a get form for the search results page, I figured that would be a
>good way to store the email alerts options as well. I am able to store the URL
>string of parameters very nicely using $url=$_SERVER['QUERY_STRING']; echo
>$url; and saving that in the database. However, I'm not sure how I can extract
>data from that string other then using the $_get ....


Try parse_str(). But if you really want to perform a DB search on that
to find matching records, you should use a better table design. Just
throwing multiple pieces of informations into a single table column like
in this cases already violates the first normal form of database design.
Really bad thing.

But how to actually structure the table(s) depends on the data you have
and what you want to do with it. Proper DB designs take some time.

Micha
  Réponse avec citation
Vieux 10/06/2008, 17h56   #4
jsteinmann
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: gathering information from stored URL

ok, well I changed it so I'm capturing the search string as well as added a
column for each search variable. I'm using the implode to seperate
the arrays with commas... like this...

$education = ''.implode(',',$_GET['education']).'';

and then insert record like this...

<input name="education" type="hidden" value="<?php echo $education; ?>">

The data then will be either % for all, or will look like this:

Bachelors Degree,Masters Degree,Other
Where those 3 options were selected

So now my question is, how do I get this back out to filter the recordset? I
have this so far:
if (isset($row['education']) != "") {
$query .= " WHERE education LIKE '{$row_rs['education']}'";
}


... but I know that's not right because I have commas and it needs to check
each answer.




  Réponse avec citation
Vieux 11/06/2008, 05h11   #5
jsteinmann
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: gathering information from stored URL

do i need to explode the data?
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 11h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14806 seconds with 13 queries