Find Jobs
Hire Freelancers

370049 php mysql change code

N/A

Abgeschlossen
Veröffentlicht vor mehr als 14 Jahren

N/A

Bezahlt bei Lieferung
Original code Table 1 id userid site subject adbody url foreach($id as $each) { mysql_query ("update 1 set approved=1 where id=".$each); // the above code marks the home site data as approved $sql = mysql_query("SELECT * FROM 1 WHERE id=".$each); $info = mysql_fetch_array($sql); // Work out the data $wannasay = array ( "userid" => $info['userid'], "site" => $info['site'], "subject" => $info['subject'], "adbody" => $info['adbody'], "url" => $domain."/[login to view URL]".$info['id'] // The data above sends the data to other sites so // if the home site is [login to view URL] the other site would // receive [login to view URL]"X" ); So in the above case if the url in the table 1 was [login to view URL] then it stays that way at the home site but the other sites would get [login to view URL]"X' I need to change this up and need new code for it to work this way. The main site (paul) holds the data in table 'holding' then when the code is executed I need it to submit the data to the other sites. In this example our table data would look like Table holding id = 1 userid = joe site = henry subject = test subject adbody = test adbody url = [login to view URL] Then on the main site 'paul' the ad would be approved and the ad is sent to the other sites. The way I need it to work is IF the ad come from the same site then the url is left [login to view URL] else it needs to check where it is sending and change the url to the correct domain. So IF site=henry then the url is [login to view URL] else if the site is not equal to henry then change the domain accordingly. For example IF site from 1(id) =henry url is [login to view URL] else all the other sites in the network receive the url as [login to view URL]"X' So a break down Say there are 10 sites in this network with [login to view URL] being the main site. The original ad came from [login to view URL] to [login to view URL] and was inserted into Table holding id = 1 userid = joe site = henry subject = test subject adbody = test adbody url = [login to view URL] The admin at [login to view URL] approves the ad and sends it to all the sites in the network, when it goes back to [login to view URL] the url is [login to view URL] but when it goes to the other sites it is [login to view URL]"X' and of course if the original ad was submitted by [login to view URL] then the url is the originally submitted url when sent back to [login to view URL] and [login to view URL]"X' when sent to the other 9 sites in the network.
Projekt-ID: 2115891

Über das Projekt

1 Vorschlag
Remote Projekt
Aktiv vor 12 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
Vergeben an:
Avatar des Nutzers
ready to start now ...
$20 USD in 0 Tag
5,0 (21 Bewertungen)
3,8
3,8

Über den Kunden

Flagge von UNITED STATES
Hollister, United States
5,0
50
Zahlungsmethode verifiziert
Mitglied seit Juli 3, 2008

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.